Revision: 4914
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4914&view=rev
Author:   mdboom
Date:     2008-01-31 10:59:22 -0800 (Thu, 31 Jan 2008)

Log Message:
-----------
Fix text spacing problems in PDF backend with some fonts.

Modified Paths:
--------------
    branches/v0_91_maint/CHANGELOG
    branches/v0_91_maint/lib/matplotlib/backends/backend_pdf.py

Modified: branches/v0_91_maint/CHANGELOG
===================================================================
--- branches/v0_91_maint/CHANGELOG      2008-01-31 17:46:56 UTC (rev 4913)
+++ branches/v0_91_maint/CHANGELOG      2008-01-31 18:59:22 UTC (rev 4914)
@@ -1,3 +1,6 @@
+2008-01-31 Fix text spacing problems in PDF backend with *some* fonts,
+           such as STIXGeneral.
+
 2008-01-31 Fix \sqrt with radical number (broken by making [ and ]
            work below) - MGD
 

Modified: branches/v0_91_maint/lib/matplotlib/backends/backend_pdf.py
===================================================================
--- branches/v0_91_maint/lib/matplotlib/backends/backend_pdf.py 2008-01-31 
17:46:56 UTC (rev 4913)
+++ branches/v0_91_maint/lib/matplotlib/backends/backend_pdf.py 2008-01-31 
18:59:22 UTC (rev 4914)
@@ -795,8 +795,7 @@
                 ccode = ord(c)
                 gind = cmap.get(ccode) or 0
                 glyph = font.load_char(ccode, flags=LOAD_NO_HINTING)
-                # Why divided by 3.0 ??? Wish I knew... MGD
-                widths.append((ccode, cvt(glyph.horiAdvance) / 3.0))
+                widths.append((ccode, glyph.horiAdvance / 6))
                 if ccode < 65536:
                     cid_to_gid_map[ccode] = unichr(gind)
                 max_ccode = max(ccode, max_ccode)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to