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:

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

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)

bug2708.patch (7.5 KB ) - added by aboudreault 16 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by aboudreault, 16 years ago

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.

by aboudreault, 16 years ago

Attachment: bug2708.patch added

comment:2 by dmorissette, 16 years ago

Component: MapServer C LibraryMapServer 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 dmorissette, 16 years ago

Cc: aboudreault added
Owner: changed from aboudreault to jmckenna

Reassigned to Jeff for docs updates, see last comment above.

comment:4 by tbonfort, 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 havatv, 13 years ago

Cc: havatv added
Resolution: fixed
Status: newclosed

Fixed for 6.0 and trunk in r12008.

Note: See TracTickets for help on using tickets.