Commit a2287b1
committed
Avoid using MacRoman encoding.
... as support for it may be missing in some alternate Python
implementations.
1) For fetching the postscript name of a font, we can just use
FT_Get_Postscript_Name (the .postscript_name attribute in FT2Font),
which is exactly implemented in the same way (see the private
sfnt_get_ps_name in the FreeType sources).
2) In ttfFontProperty, we are only looking for ASCII substrings (and
MacRoman is not a multibyte encoding), so any ASCII compatible encoding
works.
The only remaining instance of MacRoman is in the implementation of SVG
fonts in the SVG backend, but that feature is itself deprecated.1 parent 31d2c2f commit a2287b1
4 files changed
Lines changed: 9 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1129 | 1129 | | |
1130 | 1130 | | |
1131 | 1131 | | |
1132 | | - | |
1133 | | - | |
1134 | | - | |
1135 | | - | |
1136 | | - | |
1137 | | - | |
1138 | | - | |
1139 | | - | |
1140 | | - | |
| 1132 | + | |
1141 | 1133 | | |
1142 | 1134 | | |
1143 | 1135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
708 | 708 | | |
709 | 709 | | |
710 | 710 | | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
| 711 | + | |
| 712 | + | |
717 | 713 | | |
718 | 714 | | |
719 | 715 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
342 | 337 | | |
343 | 338 | | |
344 | 339 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 59 | + | |
66 | 60 | | |
67 | 61 | | |
68 | 62 | | |
| |||
0 commit comments