[mapserver-commits] r10351 - branches/branch-5-6/mapserver

svn at osgeo.org svn at osgeo.org
Wed Jul 14 05:36:48 EDT 2010


Author: dmorissette
Date: 2010-07-14 09:36:48 +0000 (Wed, 14 Jul 2010)
New Revision: 10351

Modified:
   branches/branch-5-6/mapserver/HISTORY.TXT
   branches/branch-5-6/mapserver/mapdraw.c
Log:
Fixed bitmap text font rendering (tiny was not working) (#3489,3475)

Modified: branches/branch-5-6/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-6/mapserver/HISTORY.TXT	2010-07-14 04:46:01 UTC (rev 10350)
+++ branches/branch-5-6/mapserver/HISTORY.TXT	2010-07-14 09:36:48 UTC (rev 10351)
@@ -17,6 +17,9 @@
 
 - Fixed synchronized MS_UNITS and inchesPerUnits array (#3173)
 
+- Fixed bitmap text font rendering (tiny was not working) (#3475)
+
+
 Version 5.6.4 (2010-07-08):
 ---------------------------
 

Modified: branches/branch-5-6/mapserver/mapdraw.c
===================================================================
--- branches/branch-5-6/mapserver/mapdraw.c	2010-07-14 04:46:01 UTC (rev 10350)
+++ branches/branch-5-6/mapserver/mapdraw.c	2010-07-14 09:36:48 UTC (rev 10351)
@@ -2445,10 +2445,13 @@
           if(msGetLabelSize(image,cachePtr->text, labelPtr, &r, &(map->fontset), layerPtr->scalefactor, MS_TRUE,NULL) == -1)
             return(-1);
           
-          size = labelPtr->size * layerPtr->scalefactor;
-          size = MS_MAX(size, labelPtr->minsize*image->resolutionfactor);
-          size = MS_MIN(size, labelPtr->maxsize*image->resolutionfactor);
-          scalefactor = size / labelPtr->size;
+          if(labelPtr->type == MS_TRUETYPE) {          
+              size = labelPtr->size * layerPtr->scalefactor;
+              size = MS_MAX(size, labelPtr->minsize*image->resolutionfactor);
+              size = MS_MIN(size, labelPtr->maxsize*image->resolutionfactor);
+              scalefactor = size / labelPtr->size;
+          } else
+              scalefactor = layerPtr->scalefactor;
 
           label_offset_x = labelPtr->offsetx*scalefactor;
           label_offset_y = labelPtr->offsety*scalefactor;



More information about the mapserver-commits mailing list