Skip to content
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

underscore (U+005F) not visible in .pdf when using TTF #44

Closed
theovanh opened this issue Dec 21, 2018 · 12 comments
Closed

underscore (U+005F) not visible in .pdf when using TTF #44

theovanh opened this issue Dec 21, 2018 · 12 comments

Comments

@theovanh
Copy link

Underscore (ascii 5F) is not visible when a document in Word 2007 is saved as .pdf Other fonts do not have this problem. The character '5F' is present in the .pdf but not visible. Windows 10.
image

@frankrolf
Copy link
Member

That’s odd. Which version of the font are you using? OTF or TTF?
At first glance it looks similar to this problem: adobe-fonts/source-sans#154

Would like to get to the bottom of this, but I don’t know if there’s anything one can do in the font files. Please try the TTF if you are using OTF, and vice versa.

@frankrolf
Copy link
Member

How is the PDF generated? You may want to try using the Adobe PDF “printer”:
https://helpx.adobe.com/acrobat/using/print-to-pdf.html

@theovanh
Copy link
Author

theovanh commented Dec 21, 2018 via email

@theovanh
Copy link
Author

theovanh commented Dec 21, 2018 via email

@theovanh
Copy link
Author

The font file is version 2.007; hotconv 1.0.1.08;makeotfexe 2.5.65593.
I believe the problem is rather with the Reader Reader XI, version 11.0.23. Upgraded to Reader DC 2019.010.20064 and repeated the exercise : underscore is carried through into Notepad but not shown in Reader DC:

image

@frankrolf
Copy link
Member

@theovanh Would you mind trying to write the PDF in another way – not through “save as…” but using the Adobe PDF printer. I’d be curious to know the result here.

@theovanh
Copy link
Author

I do not have the Acrobat virtual printer available. I printed with 'cutePDFWriter' which gave me a .pdf where the underscores are visible in Reader DC. When 'printed' from Word with 'Microsoft Print to PDF' the result did NOT show the underscore of Source Serif Pro but copy/paste into Notepad demonstrated that they are present (as in the test above). Probably the 'MS Print to PDF' uses the same function as its 'Save as ..'
Conclusion: the problem is caused by the Word 2007 PDF software which makes Reader DC refuse to show the 5F underscore in font Source Serif Pro.

@theovanh
Copy link
Author

theovanh commented Dec 24, 2018 via email

@frankrolf
Copy link
Member

Dear Theo, happy new year!
Unfortunately I did not personally receive the PDFs you promised (all messages are re-routed through GitHub and attachments removed)
Could you please send them again directly at fgriessh@adobe.com – thank you!

@frankrolf
Copy link
Member

Also reproduced, analog to adobe-fonts/source-sans#154 (comment):

Step-by-step:

  • install Source Serif Pro Regular 2.007 TTF
  • create new Word document in MS Word 2016 on Windows 10.
  • paste the text Function __construct($first_name, $last_name)

option 1

File → Save as… → PDF
result: underscores are missing from PDF

option 2

File → Print → Microsoft Print to PDF
result: underscores are missing from PDF

option 3

File → Save as Adobe PDF …
no text whatsoever in PDF

workaround

All above options work properly when using the equivalent OTF font.

@frankrolf frankrolf changed the title underscore (ascii 5F) not visible in .pdf underscore (ascii 5F) not visible in .pdf when using TTF Jan 4, 2019
@frankrolf frankrolf changed the title underscore (ascii 5F) not visible in .pdf when using TTF underscore (U+005F) not visible in .pdf when using TTF Jan 4, 2019
@miguelsousa
Copy link
Member

Found the problem by using MS Font Validator. The maxComponentElements value in the maxp table is set to zero (instead of 3).

This was caused by an oversight in the ttfcomponentizer adobe-type-tools/afdko#710

@miguelsousa
Copy link
Member

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

No branches or pull requests

3 participants