8000 Compute glyph widths similarly in Type 42 as in Type 3 · matplotlib/matplotlib@e76763b · GitHub
[go: up one dir, main page]

Skip to content

Commit e76763b

Browse files
committed
Compute glyph widths similarly in Type 42 as in Type 3
1 parent 7b79174 commit e76763b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/backends/backend_pdf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,8 +1040,8 @@ def embedTTFType42(font, characters, descriptor):
10401040
for c in characters:
10411041
ccode = c
10421042
gind = font.get_char_index(ccode)< 62CE /div>
1043-
glyph = font.load_char(ccode, flags=LOAD_NO_HINTING)
1044-
widths.append((ccode, glyph.horiAdvance / 6))
1043+
glyph = font.load_char(ccode, flags=LOAD_NO_SCALE|LOAD_NO_HINTING)
1044+
widths.append((ccode, cvt(glyph.horiAdvance)))
10451045
if ccode < 65536:
10461046
cid_to_gid_map[ccode] = unichr(gind)
10471047
max_ccode = max(ccode, max_ccode)

0 commit comments

Comments
 (0)
0