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

Fix reading cmap table #276

Merged
merged 1 commit into from
Aug 16, 2014
Merged

Conversation

mishoo
Copy link
Contributor

@mishoo mishoo commented Aug 16, 2014

The data offset must be saved before parsing one entry and restored
thereafter. Otherwise only the first table is parsed properly, and garbage
is returned for the rest. Fails on i.e. georgiai.ttf.

When reading the glyphIds, divide count by 2 (we read 16-bit words).

The data offset must be saved before parsing one entry and restored
thereafter.  Otherwise only the first table is parsed properly, and garbage
is returned for the rest.  Fails on i.e. georgiai.ttf.

When reading the glyphIds, divide count by 2 (we read 16-bit words).
devongovett added a commit that referenced this pull request Aug 16, 2014
@devongovett devongovett merged commit 2792ca2 into foliojs:master Aug 16, 2014
@devongovett
Copy link
Member

Great, thanks for the patch!

@jacksnose
Copy link

Hey guys, thanks for your work on makePDF, it seems to be the PDF solution I was looking for. However, I’ve been stuck for a couple of weeks trying to get Times New Roman into my pdfMake file. I posted a full explanation of my my problem on bpampuch/pdfmake#33, but in a nutshell:

I believe I have successfully completed steps 1, 2, and 3 for using custom fonts (creating a new version of vfs_fonts.js containing Times New Roman using grunt dump_dir, defining my font family, and changing my font family in doc-definition-object), but am still receiving the error: “Uncaught Error: No unicode cmap for font — pdfmake.js: 30835”. There was some discussion on bpampuch/pdfmake#18 that this error resulted from using pdfmake.min.js, but could be avoided if one used the non-min’ed version: pdfmake.js, but i am using the non-min’ed version and am still receiving the error.

It looks like this patch may solve my problem, but I have never worked with coffeescript and am a little confused. My project is a site that, thus far, uses only html, javascript, css, and php. What do I do with the snippet in “Files changed” - am I supposed to add the coffeescipt to pdfmake.js, and if so, where?

Thanks for your help!
Jack

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

Successfully merging this pull request may close these issues.

3 participants