4 ms·
That implies that PDFs work with glyph indices, not Unicode code points. How do PDFs work for shaped languages like Hindi? In a script like that, you may have g
by planteen 8y ago
That implies that PDFs work with glyph indices, not Unicode code points. How do PDFs work for shaped languages like Hindi? In a script like that, you may have glyphs without any corresponding Unicode code point. Or does the PDF perhaps store the original unshaped text?
- yorwba 8y agoIt might just be the output of some particular programs that pre-bake their ligatures. All I know is that sometimes, I try to copy-paste text out of a PDF only to end up with some annoying ligatures interspersed throughout.
- jfk13 8y agoTt's possible for a PDF to be annotated with the original Unicode text (look up the `/ActualText` feature in the spec), to support extraction of the underlying text rather than the shaped glyph stream for purposes such as copy/paste and search. However, few PDF generators do this, and not all PDF readers have good support for it. So results vary depending on the specific tools and use-case.