Skip to content

Commit b554075

Browse files
committed
pdf: Improve text with characters outside embedded font limits
For character codes outside the embedded font limits (256 for type 3 and 65536 for type 42), we output them as XObjects instead of using text commands. But there is nothing in the PDF spec that requires any specific encoding like this. Since we now support subsetting all fonts before embedding, split each font into groups based on the maximum character code (e.g., 256-entry groups for type 3), then switch text strings to a different font subset and re-map character codes to it when necessary. This means all text is true text (albeit with some strange encoding), and we no longer need any XObjects for glyphs. For users of non-English text, this means it will become selectable and copyable again. Fixes matplotlib#21797
1 parent dbd689f commit b554075

File tree

1 file changed

+67
-176
lines changed

1 file changed

+67
-176
lines changed

0 commit comments

Comments
 (0)