[mapserver-commits] r12714 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Thu Oct 27 09:09:11 EDT 2011
Author: tbonfort
Date: 2011-10-27 06:09:11 -0700 (Thu, 27 Oct 2011)
New Revision: 12714
Modified:
trunk/mapserver/maplabel.c
trunk/mapserver/maprendering.c
Log:
more robust handling of failed font lookup.
Modified: trunk/mapserver/maplabel.c
===================================================================
--- trunk/mapserver/maplabel.c 2011-10-27 12:53:04 UTC (rev 12713)
+++ trunk/mapserver/maplabel.c 2011-10-27 13:09:11 UTC (rev 12714)
@@ -758,7 +758,7 @@
}
font = msLookupHashTable(&(fontset->fonts), fontKey);
if(!font) {
- msSetError(MS_TTFERR, "Requested font (%s) not found.", "msGetLabelSize()", fontKey);
+ msSetError(MS_TTFERR, "Requested font (%s) not found.", "msFontsetLookupFont()", fontKey);
return NULL;
}
return font;
Modified: trunk/mapserver/maprendering.c
===================================================================
--- trunk/mapserver/maprendering.c 2011-10-27 12:53:04 UTC (rev 12713)
+++ trunk/mapserver/maprendering.c 2011-10-27 13:09:11 UTC (rev 12714)
@@ -55,8 +55,6 @@
s->font = msLookupHashTable(&(fontset->fonts), l->font);
if (!s->font) {
- msSetError(MS_TTFERR, "Requested font (%s) not found.",
- "msDrawText()", l->font);
return (MS_FAILURE);
}
}
@@ -887,7 +885,7 @@
labelStyleObj s;
if (!string || !strlen(string))
return (0); /* not errors, just don't want to do anything */
- computeLabelStyle(&s, label, fontset, scalefactor);
+ if(computeLabelStyle(&s, label, fontset, scalefactor) != MS_SUCCESS) return MS_FAILURE;
if (label->type == MS_TRUETYPE) {
const char* string_ptr = string;
int i;
More information about the mapserver-commits
mailing list