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

Embedding TrueType Font without unicode CMAP #121

Closed
baoshan opened this issue Apr 24, 2013 · 15 comments
Closed

Embedding TrueType Font without unicode CMAP #121

baoshan opened this issue Apr 24, 2013 · 15 comments
Labels

Comments

@baoshan
Copy link

baoshan commented Apr 24, 2013

What can I do if a TTF font doesn't contain an unicode CMAP?

The missing of the unicode CMAP lead to exception No unicode cmap for font ....

Is there any utility can append the require unicode CMAP to that TTF file, given the encoding (GBK) of that font is known.

@mrjonny2
Copy link

+1

1 similar comment
@mark-hahn
Copy link
Contributor

+1

@devongovett
Copy link
Member

Interesting. I assumed that most fonts these days would have unicode cmaps. Can anyone link me to a font without one for testing purposes? If not, I can probably figure out how to make one myself but it would be easier if someone already had a font that doesn't work. Thanks!

@mrjonny2
Copy link

@mark-hahn
Copy link
Contributor

The Cambria bold in windows 8 doesn't have a cmap. I just ran into this
last night.

@chadkirby
Copy link

IIRC, when I've run into this issue, I have opened the font in question in FontForge and exported it. The exported font has the unicode CMAP.

@baoshan baoshan closed this as completed Jun 28, 2013
@baoshan baoshan reopened this Jun 28, 2013
@baoshan
Copy link
Author

baoshan commented Jun 28, 2013

Some Chinese type foundries doesn't include CMAP with the file. I'll try FontForge to see if it can fix the missing CMAP.

@devongovett
Copy link
Member

@mrjonny2 that Palatino upload is empty btw.

@realtebo
Copy link

I've not the FontForge program .. so is there a solution to this ?

@chrisspiegl
Copy link

+1

@shyamramesh
Copy link

https://github.com/dessibelle/Blue-Screen-Saver/blob/master/Lucida%20Console.ttf -

This font also gives the error message: "No unicode cmap for font"

@javiergarmon
Copy link

+1

@nrkn
Copy link

nrkn commented Aug 27, 2014

+1

Verdana that comes with Windows:
https://www.dropbox.com/s/cxarn46gol7hqig/verdana.ttf?dl=0

@devongovett
Copy link
Member

Just released v0.6.4 with a fix for reading cmaps in #276 thanks to @mishoo. This may fix your issue. Many of the fonts listed here likely have unicode cmaps but PDFKit wasn't properly reading them. I tried the verdana linked above, and this fixes the issue there. Please try it out for your font and report back.

To be clear, PDFKit still doesn't support fonts without unicode cmaps. This just fixes reading some fonts that actually do have unicode cmaps where PDFKit previously reported that they didn't.

@shyamramesh
Copy link

It works perfectly for Verdana , Lucida Console , Impact fonts.Thanks a lot

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

No branches or pull requests

10 participants