Skip to content

Revert "Fix maxp table" #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yoshoku
Copy link

@yoshoku yoshoku commented Apr 23, 2024

With ttfunk v1.8.0, using Japanese true type fonts such as GenShin Gothic resulted in creating PDF files that could not be loaded in Acrobat Reader. The cause seems to be with maxp, and by applying a monkey patch to make the code equivalent to ttfunk v1.7.0, normal PDFs were able to be generated. So I would like to revert the relevant code. If I revert the pull request #78, the ChangeLog and others would also be reverted, so I reverted only the code to be the same as ttfunk v1.7.0. Issue #102 likely has the same root cause.

Copy link

@nilsrennebarth nilsrennebarth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this fixes the Adobe Reader warnings "Cannot extract embedded font xxx" when viewing a PDF generated with prawn 2.4.0
I am well aware that reverting this change to the encode function is not a real fix, but the current encode function just does not work so we better get back to the old function that does work.

@hayaokimura
Copy link

hayaokimura commented Oct 22, 2024

Thank you for developing such a wonderful gem.

Is there any issue preventing this PR from being merged? I’m experiencing the same issue in my environment, and I would love to update the TTFunk version if this could be merged. It would be greatly appreciated.

@pointlessone
Copy link
Member

@hayaokimura Lack of time.

@johnnyshields
Copy link

@pointlessone This looks like a reasonable revert of this function. Since we know this function worked in ttfunk 1.7.0, and if we don't anticipate any knock-on effects from it, can we merge and release this as 1.8.1? I will run this in production and see how it works.

@johnnyshields
Copy link

@pointlessone I'm running this in production for a wide range of PDF types and fonts/languages with no issues reported. I think it's safe to merge--certainly safer than the alternative of having people suffer this bug when they upgrade!

@pointlessone
Copy link
Member

@johnnyshields Have you tried #106?

@johnnyshields
Copy link

johnnyshields commented Apr 13, 2025

@pointlessone not yet, didn't see that one, thanks for pointing it out.

I will try it this week and see if we get any reports of issues. FYI my product (TableCheck) is used in 13,000 restaurants, at least ~30% of whom are generating PDFs daily for their guestlist. We also do PDF e-receipts for online payments as well.

@johnnyshields
Copy link

@pointlessone As commented in #106, I've tested #106 and it looks good. If it could be released as a tiny version I'm sure many people would appreciate it.

@yoshoku
Copy link
Author

yoshoku commented May 13, 2025

I've also confirmed that issue will be fixed by #102 👍 I will close this pull request after #106 is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants