-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
[pdf] TTF font displayed as dots on iOS and Adobe Reader (OTF equivalent is fine) #60
Comments
Someone e-mailed me personally with the same issue, this was my response:
Can you output a PDF of https://github.com/tdewolff/canvas/tree/master/examples/document and see what happens? That is, does this happen when there is a UTF-8 character used, or also when just using ASCII. In general, at https://github.com/tdewolff/canvas/blob/master/pdf/renderer.go#L490 I'm wrapping the font program in a couple of layers which seems to be unnecessary and might be part of the problem. For example, output from Inkscape is much more concise. In particular, this could be fixed with a GID to codepoint table as defined in the PDF specification, but I think it could be simpler by more directly embedding the font program and specifying the right encoding. In the future it would be desireable to create the TTF/OTF font (instead of copying the original font file) so that we can tweak the GID=>codepoint table to match one of PDFs encodings and so we can subset the file and remove unnecessary tables. |
This should be fixed in the |
I generated the following pdf by running this program:
bug.pdf
(you can get the OTF and TTF font at https://github.com/adobe-fonts/source-serif-pro)
It produces the following pdf:
bug.pdf
It displays fine on all PDF reader that I could test on linux (evince, firefox, chromium), but the second line (the one using the TTF font) displays only dots on Adobe Reader and iOS:
Do you have any idea what might be wrong ? (or at least in which direction should I search?)
The text was updated successfully, but these errors were encountered: