ttfunk icon indicating copy to clipboard operation
ttfunk copied to clipboard

Pass correct glyph mapping when encoding maxp

Open thatsmydoing opened this issue 9 months ago • 6 comments

The encode function takes new2old_glyph but was being passed old_to_new_glyph which was causing the calculated metrics to be for the wrong glyphs. I think this should fix #102 (at least for our use case it does).

thatsmydoing avatar Mar 26 '25 09:03 thatsmydoing

@pointlessone I've tested this in production and it looks good to merge and release.

johnnyshields avatar May 13 '25 06:05 johnnyshields

@pointlessone I've confirmed too that this pull request fixes the issue even when using Japanese TrueType fonts such as Genshin Gothic, similar to #104.

yoshoku avatar May 13 '25 14:05 yoshoku

@pointlessone can you please handle the merge and release of this? I've been using it prod for several months without issue.

johnnyshields avatar Jun 21 '25 08:06 johnnyshields

Thank you @johnnyshields, I'll get to it eventually.


Unrelated to the PR.

@johnnyshields You've been active in this part of the woods lately so I'm wandering what's the status of your fork. Are you still maintaining it? Have you retired it? Just want to orient myself.

pointlessone avatar Jun 21 '25 09:06 pointlessone

I haven't spent further time on the Prawn community fork.

As I've continually expressed, my preferences for Prawn are (in this order):

  1. You (@pointlessone) do a proper job in maintaining Prawn.
    • The term "proper" includes not letting easily fixed regressions such as this one go unpatched for months while a confused/bewildered community files countless duplicate issues for the same root cause.
  2. You designate a co-maintainer who can do the proper job given your limited bandwidth. It is fine if such role is limited only to triaging/testing critical issues such as this one. I am glad to assist in such role, and there are plenty of other good options if not me.
  3. We move forward with a community fork, which is a major hassle for everyone, and requires more of my personal time/effort than I really want to spend here.

For a few months you were making solid progress on Prawn, but with this issue it appears momentum is stalling. I hope we see this patch merged soon.

johnnyshields avatar Jun 21 '25 17:06 johnnyshields

Running this patch in production for about 2 weeks and no problems to report so far. TTF fonts only, and multiple languages.

gem 'prawn', '~> 2.5.0'
gem "ttfunk", "~> 1.8.0", github: "thatsmydoing/ttfunk", branch: "fix-maxp-again"

flavio-b avatar Aug 21 '25 19:08 flavio-b