Opened 16 years ago
Closed 13 years ago
#2708 closed enhancement (fixed)
Text font/styleitem auto: styles support enchancement
Reported by: | aboudreault | Owned by: | jmckenna |
---|---|---|---|
Priority: | normal | Milestone: | 5.6 release |
Component: | Documentation - MapServer | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | dmorissette, aboudreault, havatv |
Description
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":
http://trac.osgeo.org/mapserver/browser/trunk/mapserver/mapogr.cpp#L2215
http://trac.osgeo.org/mapserver/browser/trunk/mapserver/mapogr.cpp#L2273
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:
http://trac.osgeo.org/gdal/ticket/2480
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
Attachments (1)
Change History (6)
comment:1 by , 16 years ago
by , 16 years ago
Attachment: | bug2708.patch added |
---|
comment:2 by , 16 years ago
Component: | MapServer C Library → MapServer Documentation |
---|
I have committed the patch (in r7826) with a small modification to include a
#if GDAL_VERSION_NUM >= 1600
around the code that uses the new OGRSTLabelOColor identifier that was added in GDAL for this.
Moving to doc component for Jeff to update the OGR HOWTO... the most important update for the docs is the new convention for font names with the -bold and -italic suffixes... the rest should be transparent to the users.
comment:3 by , 16 years ago
Cc: | added |
---|---|
Owner: | changed from | to
Reassigned to Jeff for docs updates, see last comment above.
comment:4 by , 16 years ago
mapogr.cpp needs to check for gdal version >=1.4 for the label shadowcolor part of this fix. fixed in r7837
comment:5 by , 13 years ago
Cc: | added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Fixed for 6.0 and trunk in r12008.
Here the patch. Like i mentionned in the bug description, the background don't work at the moment but should work after the "bug fix" of the bug 2705.
There is also a small modification about the Shadow color implementation. It's not the "backgroundshadowcolor" property, it's the "shadowcolor" property used for this style.