SLD, fonts and Mapserver

Yewondwossen Assefa assefa at DMSOLUTIONS.CA
Tue Dec 6 07:38:31 PST 2005


Hi There,

I have added a bug on it

http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1552 and corrected it. 
It will be available for the 4.8 relase. (You can get it from CVS too).

The documentation was correct but the code actually doing it was 
missing. It is one of those rare momenets where the docs are more 
uptodate that the code.

I hace also noted when verifying this bug that there was a mistake in 
the order in whic the fint paramaters are used to build the font name. I 
have entered a bug on it (Bug 1553)

If the sld you are using contain "normal" a quick around before you get 
the 4.8 would be to define your fonts in fonts.txt using the word 
normal. For example :
  times-bold-normal               timesbd.ttf

One last thing, thanks for reporting it with clear examples.

Later,


Gustavo Henrique Sberze Ribas wrote:

 > Hi,
 >
 > I wonder what I'm doing wrong here, I'm trying to format the layer's
 > font with SLD using the <sld:font> tag but if I set the style or 
weight to normal Mapserver ignores everything and use the default bitmap 
font.
 > I.e., if the following tag is present in the SLD
 >  <sld:CssParameter name="font-style">normal</sld:CssParameter>
 >
 > then mapserver will use the default font and ignore the other 
attributes such as size and rotation. This happens with versions 4.4
 > and 4.6 (ms4w).
 >
 >  I've build a simple test page to show the problem:
 >  http://www.cpqd.com.br/mrni-geo/sld_test.html
 >
 >
 >  Any ideas? From the how-to:
 >
 > "When a Font Style or a Font Weight is set to normal in an SLD, it is 
also ignored in building the name. For example, if there is an SLD with 
a Font Family of arial, a Font Style of normal and a Font weight equals 
to bold, the resulting MapServer font name is arial-bold."
 >
 > thanks,
 >
 >


-- 
----------------------------------------------------------------
Assefa Yewondwossen           Software Analyst
Email: assefa at dmsolutions.ca    http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------



More information about the MapServer-users mailing list