Opened 20 years ago

Closed 16 years ago

#605 closed enhancement (fixed)

alignment parameter for WRAP

Reported by: dgadoury@… Owned by: mapserverbugs
Priority: normal Milestone:
Component: MapServer C Library Version: 4.1
Severity: minor Keywords:
Cc: giorgio.plazzotta@…

Description (last modified by tbonfort)

When a WRAP character is specified the label text is split onto multiple lines
but there is no way to specify how to align the lines of text, i.e. left, center
or right. For example the following string in the LABELITEM field:

United States*of America

always produces the label like this:
United States
of America

What I really want is:
United States
 of America

In another situation I might want:
United States
   of America

I can fake it by adding spaces after the wrap character in the label field, but
that is sloppy and produces different results with different fonts.

A new parameter something like WRAPALIGN [left|center|right] would allow this
flexibility.

Change History (6)

comment:1 by dmorissette, 20 years ago

Cc: steve.lime@… added
Component: Build ProblemsMapServer C Library

comment:2 by sdlime, 20 years ago

This functionality lives within the GD/Freetype interface and not within 
MapServer itself. All MapServer does is format the string so GD recognizes 
multiple lines. When GD supports it we can...

Steve

comment:3 by dmorissette, 20 years ago

Cc: giorgio.plazzotta@… added

comment:4 by dmorissette, 20 years ago

*** Bug 351 has been marked as a duplicate of this bug. ***

comment:5 by mmanzato, 16 years ago

I wonder if with the new AGG renderer this has become possible.

In fact I would suggest _not_ to require a new label parameter. I'd rather perform an automated computation of the alignment based on the LABEL's "POSITION xx":

xx    Label text alignment
--------------------------
ul    right
uc    center
ur    left
cl    right
cc    center
cr    left
ll    right
lc    center
lr    left
auto  Find out best "xx", then apply 
      alignment above.

Bye

Michele

comment:6 by tbonfort, 16 years ago

Description: modified (diff)
Resolution: fixed
Status: newclosed

alignment and wrapping added with #2383

Note: See TracTickets for help on using tickets.