Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 70d9999

Browse filesBrowse files
committed
Fix text spacing problems in PDF backend with some fonts.
svn path=/branches/v0_91_maint/; revision=4914
1 parent 29466fb commit 70d9999
Copy full SHA for 70d9999

File tree

Expand file treeCollapse file tree

2 files changed

+4
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-2
lines changed
Open diff view settings
Collapse file

‎CHANGELOG‎

Copy file name to clipboardExpand all lines: CHANGELOG
+3Lines 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

Collapse file

‎lib/matplotlib/backends/backend_pdf.py‎

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_pdf.py
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,8 +795,7 @@ def embedTTFType42(font, characters, descriptor):
795795
ccode = ord(c)
796796
gind = cmap.get(ccode) or 0
797797
glyph = font.load_char(ccode, flags=LOAD_NO_HINTING)
798-
# Why divided by 3.0 ??? Wish I knew... MGD
799-
widths.append((ccode, cvt(glyph.horiAdvance) / 3.0))
798+
widths.append((ccode, glyph.horiAdvance / 6))
800799
if ccode < 65536:
801800
cid_to_gid_map[ccode] = unichr(gind)
802801
max_ccode = max(ccode, max_ccode)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.