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

Embedded font subset needs to be sharded to support pdf file with more than 127 glyphs #114

Closed
kamikat opened this issue Feb 21, 2013 · 13 comments
Labels

Comments

@kamikat
Copy link
Contributor

kamikat commented Feb 21, 2013

When the embedded character glyph‘s id grows over 127 (the @next variable in Subset.coffee), Adobe Reader and Okular will not read the glyph(a character indicating glyph missing is displayed). Foxit Reader and Google Chrome will display the glyph correctly but have problem calculating width of character (the width of the glyph is ignored and the following character will overlay on this character). The character with id = 127 will not display in all readers.

I found that there are many pdf file have several subset to same FontFamily. Maybe there is a limit in the Subset and PDFKit should implement a sharding in font subsetting.

@nirajp
Copy link

nirajp commented Sep 27, 2013

I observe the same behavior. It is necessary to fix this.

@hks2002
Copy link

hks2002 commented Dec 17, 2015

any new about this?

@nirajp
Copy link

nirajp commented Dec 17, 2015

I did make some fixes in a forked repo. You might want to check https://github.com/menway/pdfkit

@hks2002
Copy link

hks2002 commented Dec 17, 2015

thank you.
But I am not familiar to coffee, even node.js. I just want to use pdfmake.js to generate PDF file on client browser side. I found CJK text can't show in pdf, then see pdfmake use pdkkit as its core, then found the root cause.

i need more times to learn coffee and node.js. thank you again.

@kamikat
Copy link
Contributor Author

kamikat commented Dec 17, 2015

You can look into bpampuch/pdfmake#221 which makes a hack on pdfmake.

@jwerre
Copy link

jwerre commented Jun 10, 2016

What is the status on this? Is this still an issue?

@ben-at-xtramath
Copy link

@devongovett We're using pdfkit to generate certificates etc, but have been running into various issues related to the above when using Japanese. I've tried the fontkit branch and that works pretty well. The issue is that for the browser, we'd like to avoid having the user download a Japanese font every time just to get it to work.

I like pdfkit, but want to avoid the need to register/embed a font and just rely on a user's built in fonts for non Roman character. My understanding of Adobe's handling of CID fonts makes me think that this is possible. I'm getting a little lost between reading Adobe docs and pdfkit source code. Could you point me in the right direction(or provide some thoughts) if I wanted to add this capability to pdfkit?

Thank you

@devongovett
Copy link
Member

This should be fixed in v0.8.0, which uses CID fonts.

@kelly-tock
Copy link

i'm still seeing issues with japanese characters after upgrading to the latest. is there a particular font I should specify you think to handle asian characters?

@jwerre
Copy link

jwerre commented Jul 12, 2018

@kelly-tock I had the best luck with Arial.

@kelly-tock
Copy link

so I still think there are some issues. with the interactive browser demo linked to from the docs, you can't render asian characters. is there some other metadata needed to set to handle this case?

@kelly-tock
Copy link

just as a simple repro, the interactive browser demo does not display correctly if you enter japanese characters in it.

@nirajp
Copy link

nirajp commented Jul 16, 2018 via email

opennode-jenkins pushed a commit to waldur/waldur-homeport that referenced this issue Mar 6, 2019
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

7 participants