[mapserver-commits] r8904 - branches/branch-5-4/mapserver

svn at osgeo.org svn at osgeo.org
Tue Apr 14 09:29:10 EDT 2009


Author: dmorissette
Date: 2009-04-14 09:29:10 -0400 (Tue, 14 Apr 2009)
New Revision: 8904

Modified:
   branches/branch-5-4/mapserver/HISTORY.TXT
   branches/branch-5-4/mapserver/maplabel.c
   branches/branch-5-4/mapserver/mapprimitive.c
Log:
Fixed handling of return value of msGetLabelSize() (#2974)

Modified: branches/branch-5-4/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-4/mapserver/HISTORY.TXT	2009-04-13 16:57:21 UTC (rev 8903)
+++ branches/branch-5-4/mapserver/HISTORY.TXT	2009-04-14 13:29:10 UTC (rev 8904)
@@ -12,8 +12,11 @@
 Current Version
 ---------------
 
-- Prevent from changing the connection type to MS_RASTER when setConnectionType(MS_WMS) is used (#2908)
+- Prevent from changing the connection type to MS_RASTER when
+  setConnectionType(MS_WMS) is used (#2908)
 
+- Fixed ANGLE FOLLOW code to return a "font not found" error when a TTF file
+  is not found instead of silently producing a map with no label (#2974)
 
 Version 5.4.0-rc1 (2009-04-08):
 -------------------------------

Modified: branches/branch-5-4/mapserver/maplabel.c
===================================================================
--- branches/branch-5-4/mapserver/maplabel.c	2009-04-13 16:57:21 UTC (rev 8903)
+++ branches/branch-5-4/mapserver/maplabel.c	2009-04-14 13:29:10 UTC (rev 8904)
@@ -776,7 +776,7 @@
     }
 
     if(msGetTruetypeTextBBox(img,font,size,string,rect,advances)!=MS_SUCCESS)
-        return MS_FAILURE;
+        return -1;
 
     /* bug 1449 fix (adjust baseline) */
     if(adjustBaseline) {
@@ -794,7 +794,7 @@
         free(firstLine);
       }
     }
-    return MS_SUCCESS;
+    return 0;
 #else
     msSetError(MS_TTFERR, "TrueType font support is not available.", "msGetLabelSize()");
     return(-1);

Modified: branches/branch-5-4/mapserver/mapprimitive.c
===================================================================
--- branches/branch-5-4/mapserver/mapprimitive.c	2009-04-13 16:57:21 UTC (rev 8903)
+++ branches/branch-5-4/mapserver/mapprimitive.c	2009-04-14 13:29:10 UTC (rev 8904)
@@ -1460,7 +1460,7 @@
     goto FAILURE;
   
   /* determine the total length of the text */
-  if (msGetLabelSize(img,string, label, &bbox, fontset, scalefactor, MS_FALSE, &offsets) == MS_FAILURE) {
+  if (msGetLabelSize(img,string, label, &bbox, fontset, scalefactor, MS_FALSE, &offsets) == -1) {
     *status = MS_FAILURE;
     goto FAILURE;
   }



More information about the mapserver-commits mailing list