Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7ef1071

Browse files
committed
Merged revisions 4912-4914 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint ........ r4914 | mdboom | 2008-01-31 13:59:22 -0500 (Thu, 31 Jan 2008) | 2 lines Fix text spacing problems in PDF backend with some fonts. ........ svn path=/trunk/matplotlib/; revision=4915
1 parent c379aae commit 7ef1071

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2008-01-31 Fix text spacing problems in PDF backend with *some* fonts,
2+
such as STIXGeneral.
3+
14
2008-01-31 Fix \sqrt with radical number (broken by making [ and ]
25
work below) - MGD
36

lib/matplotlib/backends/backend_pdf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -801,8 +801,7 @@ def embedTTFType42(font, characters, descriptor):
801801
ccode = ord(c)
802802
gind = cmap.get(ccode) or 0
803803
glyph = font.load_char(ccode, flags=LOAD_NO_HINTING)
804-
# Why divided by 3.0 ??? Wish I knew... MGD
805-
widths.append((ccode, cvt(glyph.horiAdvance) / 3.0))
804+
widths.append((ccode, glyph.horiAdvance / 6))
806805
if ccode < 65536:
807806
cid_to_gid_map[ccode] = unichr(gind)
808807
max_ccode = max(ccode, max_ccode)

0 commit comments

Comments
 (0)