Revision: 8373
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8373&view=rev
Author:   mdboom
Date:     2010-06-04 12:48:54 +0000 (Fri, 04 Jun 2010)

Log Message:
-----------
[3010045] leading whitespace removed from text

Modified Paths:
--------------
    trunk/matplotlib/src/ft2font.cpp

Modified: trunk/matplotlib/src/ft2font.cpp
===================================================================
--- trunk/matplotlib/src/ft2font.cpp    2010-06-04 03:37:56 UTC (rev 8372)
+++ trunk/matplotlib/src/ft2font.cpp    2010-06-04 12:48:54 UTC (rev 8373)
@@ -916,15 +916,15 @@
   for ( size_t n = 0; n < glyphs.size(); n++ ) {
     FT_BBox glyph_bbox;
     FT_Glyph_Get_CBox( glyphs[n], ft_glyph_bbox_subpixels, &glyph_bbox );
+    if ( glyph_bbox.xMin < bbox.xMin ) bbox.xMin = glyph_bbox.xMin;
+    if ( glyph_bbox.yMin < bbox.yMin ) bbox.yMin = glyph_bbox.yMin;
     if (glyph_bbox.xMin == glyph_bbox.xMax) {
       right_side += glyphs[n]->advance.x >> 10;
       if ( right_side > bbox.xMax ) bbox.xMax = right_side;
     } else {
-      if ( glyph_bbox.xMin < bbox.xMin ) bbox.xMin = glyph_bbox.xMin;
-      if ( glyph_bbox.yMin < bbox.yMin ) bbox.yMin = glyph_bbox.yMin;
       if ( glyph_bbox.xMax > bbox.xMax ) bbox.xMax = glyph_bbox.xMax;
-      if ( glyph_bbox.yMax > bbox.yMax ) bbox.yMax = glyph_bbox.yMax;
     }
+    if ( glyph_bbox.yMax > bbox.yMax ) bbox.yMax = glyph_bbox.yMax;
   }
   /* check that we really grew the string bbox */
   if ( bbox.xMin > bbox.xMax ) {


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

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to