question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
devongovettcommented, Aug 27, 2016

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

0reactions
nirajpcommented, Jul 16, 2018

I had fixed asian character rendering in my own fork https://github.com/nirajp/pdfkit. You may want to try it out. That was more than 4 year ago, so not sure if those will still hold. You might have to merge my changes with latest devongovett/pdfkit.

My changes were not compatible with devongovett/pdfkit, hence I could not submit a pull request, but nevertheless the changes did serve my purpose well at the time.

Best luck.

On Fri, 13 Jul 2018 at 21:23, Kelly notifications@github.com wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/devongovett/pdfkit/issues/114#issuecomment-404874802, or mute the thread https://github.com/notifications/unsubscribe-auth/ABiNheBZQ_pA7E-ebwY-rXnozvalIfbCks5uGMKWgaJpZM4Acnoo .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fully embedding fonts in PDF - Adobe Support Community
(3) The subset threshold value of 0 (zero) may effectively cause all the glyphs of a font to be embedded in some, but...
Read more >
Re-Subsetting Embedded Font Subsets - PDF Association
Font subsets can include glyphs that were originally needed but are no longer necessary in the document after it has been modified. With...
Read more >
Glyphs 3 Handbook
Glyphs 3 is a professional Mac application for creating OpenType fonts. It allows you to draw, edit and test letter shapes in a...
Read more >
cairo 1.15.10 release available
Fix falling back to system font with PDFs using certain embedded fonts, due to truncated font names. (Bug #103249) * Fix handling of...
Read more >
arXiv:1910.00748v2 [cs.LG] 16 May 2020
One of the most visible attributes of digital lan- guage data is its typography. ... variable is shared by all characters within a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found