Ticket #2708 (closed enhancement: fixed)
Text font/styleitem auto: styles support enchancement
|Reported by:||aboudreault||Owned by:||jmckenna|
|Component:||Documentation - MapServer||Version:||unspecified|
|Cc:||dmorissette, aboudreault, havatv|
There are some text font styles that are not supported: bold, italic, background color, shadow color and outline color. These styles support can be added in the mapogr.cpp file in the "msOGRLayerGetAutoStyle". Here are the following changes i'm going to do:
- Background color
Changing these two lines code to "label.backgroundcolor":
This code make the background color applied to the foreground color and should be changed. However, this change will not make the background color work properly: see the following bug for more detail: bug 2705
- Outline color
I made a patch for this support in GDAL/OGR and this version will be needed in the current version of MapServer, see the related bug:
We'll be able to add the oultline color support in the same way as the foreground/background color with the "outlinecolor" property of the label object.
- Shadow color
This style is already in GDAL/OGR as "OGRSTLabelHColor" and will be added to MapServer in the same way as foreground/background color with the "backgroundshadowcolor" property of the label object.
- Bold and Italic
These styles are already in GDAL/OGR. They'll be implemented in this way:
If one style is set, the string "-bold"/ "-italic" will be concatenate to the fontname. If both are set, the string "-bold-italic" will be concatenate to the fontname.
Arial bold fontname: arial-bold
Arial italic fontname: arial-italic
Arial bold italic fontname: arial-bold-italic