Revision: 4059
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4059&view=rev
Author:   mdboom
Date:     2007-10-29 11:23:24 -0700 (Mon, 29 Oct 2007)

Log Message:
-----------
Merged revisions 4001-4058 via svnmerge from 
http://matplotlib.svn.sf.net/svnroot/matplotlib/trunk/matplotlib

........
  r4020 | mdboom | 2007-10-26 14:44:16 -0400 (Fri, 26 Oct 2007) | 3 lines
  
  Initialized merge tracking via "svnmerge" with revisions "1-3806" from 
  https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/transforms
........
  r4039 | jdh2358 | 2007-10-28 11:18:02 -0400 (Sun, 28 Oct 2007) | 1 line
  
  added time series to specgram
........
  r4046 | mdboom | 2007-10-29 10:30:51 -0400 (Mon, 29 Oct 2007) | 3 lines
  
  Fixing bug in font rendering -- the patented freetype hinter appears
  to be unable to deal with the non-square hinting grid hack.
........
  r4047 | mdboom | 2007-10-29 10:44:18 -0400 (Mon, 29 Oct 2007) | 4 lines
  
  Fixing bug in font rendering -- the patented freetype hinter appears
  to be unable to deal with the non-square hinting grid hack. [Forgot
  this file].
........
  r4057 | mdboom | 2007-10-29 13:47:10 -0400 (Mon, 29 Oct 2007) | 2 lines
  
  Improve the code coverage of backend_driver.py
........

Modified Paths:
--------------
    branches/transforms/examples/specgram_demo.py
    branches/transforms/lib/matplotlib/backends/backend_agg.py
    branches/transforms/lib/matplotlib/mathtext.py
    branches/transforms/src/ft2font.cpp

Property Changed:
----------------
    branches/transforms/


Property changes on: branches/transforms
___________________________________________________________________
Name: svnmerge-integrated
   - /trunk/matplotlib:1-4000
   + /trunk/matplotlib:1-4058

Modified: branches/transforms/examples/specgram_demo.py
===================================================================
--- branches/transforms/examples/specgram_demo.py       2007-10-29 18:20:11 UTC 
(rev 4058)
+++ branches/transforms/examples/specgram_demo.py       2007-10-29 18:23:24 UTC 
(rev 4059)
@@ -21,6 +21,9 @@
 # the frequency vector, bins are the centers of the time bins in which
 # the power is computed, and im is the matplotlib.image.AxesImage
 # instance
+
+ax1 = subplot(211)
+plot(t, x)
+subplot(212, sharex=ax1)           
 Pxx, freqs, bins, im = specgram(x, NFFT=NFFT, Fs=Fs, noverlap=900)
-colorbar()
 show()

Modified: branches/transforms/lib/matplotlib/backends/backend_agg.py
===================================================================
--- branches/transforms/lib/matplotlib/backends/backend_agg.py  2007-10-29 
18:20:11 UTC (rev 4058)
+++ branches/transforms/lib/matplotlib/backends/backend_agg.py  2007-10-29 
18:23:24 UTC (rev 4059)
@@ -82,7 +82,7 @@
 from matplotlib.cbook import enumerate, is_string_like, exception_to_str
 from matplotlib.figure import Figure
 from matplotlib.font_manager import findfont
-from matplotlib.ft2font import FT2Font, LOAD_DEFAULT
+from matplotlib.ft2font import FT2Font, LOAD_FORCE_AUTOHINT
 from matplotlib.mathtext import MathTextParser
 from matplotlib.path import Path
 from matplotlib.transforms import Affine2D, Bbox
@@ -147,11 +147,11 @@
         font = self._get_agg_font(prop)
         if font is None: return None
         if len(s) == 1 and ord(s) > 127:
-            font.load_char(ord(s), flags=LOAD_DEFAULT)
+            font.load_char(ord(s), flags=LOAD_FORCE_AUTOHINT)
         else:
             # We pass '0' for angle here, since it will be rotated (in raster
             # space) in the following call to draw_text_image).
-            font.set_text(s, 0, flags=LOAD_DEFAULT)
+            font.set_text(s, 0, flags=LOAD_FORCE_AUTOHINT)
         font.draw_glyphs_to_bitmap()
 
         #print x, y, int(x), int(y)
@@ -181,7 +181,7 @@
                 self.mathtext_parser.parse(s, self.dpi, prop)
             return width, height, descent
         font = self._get_agg_font(prop)
-        font.set_text(s, 0.0, flags=LOAD_DEFAULT)  # the width and height of 
unrotated string
+        font.set_text(s, 0.0, flags=LOAD_FORCE_AUTOHINT)  # the width and 
height of unrotated string
         w, h = font.get_width_height()
         d = font.get_descent()
         w /= 64.0  # convert from subpixels

Modified: branches/transforms/lib/matplotlib/mathtext.py
===================================================================
--- branches/transforms/lib/matplotlib/mathtext.py      2007-10-29 18:20:11 UTC 
(rev 4058)
+++ branches/transforms/lib/matplotlib/mathtext.py      2007-10-29 18:23:24 UTC 
(rev 4059)
@@ -141,7 +141,7 @@
 from matplotlib.afm import AFM
 from matplotlib.cbook import Bunch, get_realpath_and_stat, \
     is_string_like
-from matplotlib.ft2font import FT2Font, FT2Image, KERNING_DEFAULT, 
LOAD_DEFAULT, LOAD_NO_HINTING
+from matplotlib.ft2font import FT2Font, FT2Image, KERNING_DEFAULT, 
LOAD_FORCE_AUTOHINT, LOAD_NO_HINTING
 from matplotlib.font_manager import findfont, FontProperties
 from matplotlib._mathtext_data import latex_to_bakoma, \
         latex_to_standard, tex2uni, tex2type1, uni2type1, \
@@ -304,7 +304,7 @@
                 self.fonts_object.get_used_characters())
 
     def get_hinting_type(self):
-        return LOAD_DEFAULT
+        return LOAD_FORCE_AUTOHINT
 
 def MathtextBackendAgg():
     return MathtextBackendBbox(MathtextBackendAggRender())

Modified: branches/transforms/src/ft2font.cpp
===================================================================
--- branches/transforms/src/ft2font.cpp 2007-10-29 18:20:11 UTC (rev 4058)
+++ branches/transforms/src/ft2font.cpp 2007-10-29 18:23:24 UTC (rev 4059)
@@ -943,7 +943,7 @@
 
   angle = angle/360.0*2*3.14159;
 
-  long flags = FT_LOAD_DEFAULT;
+  long flags = FT_LOAD_FORCE_AUTOHINT;
   if (kwargs.hasKey("flags"))
     flags = Py::Long(kwargs["flags"]);
 
@@ -1054,7 +1054,7 @@
 }
 
 char FT2Font::load_char__doc__[] =
-"load_char(charcode, flags=LOAD_LOAD_DEFAULT)\n"
+"load_char(charcode, flags=LOAD_FORCE_AUTOHINT)\n"
 "\n"
 "Load character with charcode in current fontfile and set glyph.\n"
 "The flags argument can be a bitwise-or of the LOAD_XXX constants.\n"
@@ -1075,7 +1075,7 @@
   //load a char using the unsigned long charcode
 
   args.verify_length(1);
-  long charcode = Py::Long(args[0]), flags = Py::Long(FT_LOAD_DEFAULT);
+  long charcode = Py::Long(args[0]), flags = Py::Long(FT_LOAD_FORCE_AUTOHINT);
   if (kwargs.hasKey("flags"))
     flags = Py::Long(kwargs["flags"]);
   


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to