prawnpdf / ttfunk

Font Metrics Parser for Prawn
http://prawnpdf.org
Other
125 stars 75 forks source link

Fix maxp table encoding causing ghostscript error #71

Closed camertron closed 4 years ago

camertron commented 4 years ago

See: https://github.com/prawnpdf/ttfunk/issues/53#issuecomment-570890100

I'm baffled as to how this got past FontValidator, but it did. In fact it turns out basically all our maxp calculations are wrong. Fortunately most font display systems don't care, but we should probably work on computing correct max profile statistics :/

ollym commented 4 years ago

@camertron @pointlessone this commit broke font rendering on all Windows platforms.

pointlessone commented 4 years ago

@ollym Any specific software/version you refer to?

ollym commented 4 years ago

@pointlessone this is using PrawnPDF. Related to this: https://github.com/prawnpdf/ttfunk/issues/72

Find an attached PDF that demonstrates the issue.

vouchers.pdf

When opened in windows using Acrobat, I get the following error:

image

And all the fonts are blank. This issue doesn't happen on OSX / Linux / iOS / Android

Rolling back to 1.5.1 fixed the issue. I think it's related to this commit.

pointlessone commented 4 years ago

@ollym Thank you.

camertron commented 4 years ago

@ollym does the problem happen with v1.6.0?

ollym commented 4 years ago

@camertron just confirmed, it works absolutely fine on 1.6.0 with no problems. The issue was introduced in 1.6.1

ollym commented 4 years ago

I think this comment is a good summary of the errors: https://github.com/prawnpdf/ttfunk/issues/72#issuecomment-571995537