You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I assume it is not possible to reference a glyph without a unicode name in insert_text and insert_textbox for export to PDF.
How to reproduce the bug
At least Gotham Narrow fonts have defined a separate range of digits 0-9 without unicode names.
Downloaded from https://freefontsfamily.com/gotham-font-family/
Glyphs 0183 - 018d, they are named in the font as zero.tab, one.tab, two.tab etc. (checked for Gotham Narrow Medium)
PyMuPDF version
1.23.8
Operating system
MacOS
Python version
3.9
The text was updated successfully, but these errors were encountered:
I'm not sure I understand the issue.
Both methods Page.insert_text/Page.insert_textbox simply use the Unicode number of a character to lookup the desired glyph and then output the glyph's hex value.
There is no other check whatsoever.
I interpret your answer as my assumption is correct, pymupdf (Python/HTML) can only access glyphs with a valid Unicode codepoint.
To make such glyphs usable, we must update the fonts with valid Unicode codepoints and ensure that the fonts are embedded in the PDF.
To make such glyphs usable, we must update the fonts with valid Unicode codepoints and ensure that the fonts are embedded in the PDF.
Correct - with the additional comment that the embedding itself is happening automatically, once at least one Unicode of the font has been written.
Initially, a font is embedded in its entirety. You have the option to execute doc.subset_fonts() right before saving. This will scan the PDF for fonts that benefit from a smaller size, when unused glyphs are stripped off of it. Beneficial for large fonts (e.g. Asian scripts).
Description of the bug
I assume it is not possible to reference a glyph without a unicode name in insert_text and insert_textbox for export to PDF.
How to reproduce the bug
At least Gotham Narrow fonts have defined a separate range of digits 0-9 without unicode names.
Downloaded from https://freefontsfamily.com/gotham-font-family/
Glyphs 0183 - 018d, they are named in the font as zero.tab, one.tab, two.tab etc. (checked for Gotham Narrow Medium)
PyMuPDF version
1.23.8
Operating system
MacOS
Python version
3.9
The text was updated successfully, but these errors were encountered: