[mapserver-users] Why failed to hard wrap labels?

Jackey Cheung cheung.jackey at gmail.com
Wed Dec 14 05:46:19 EST 2011


Hi all,


I have met a weird situation while using hard wraps on labels. I
haven't tried on English labels, the same wrapping setting yields
different results when applied to Chinese labels. It's not the first
time i have met this problem, nor the sending mail here. This time I
have made a test case.

Attached is a map file for testing, and its output (cropped). In the
output image, you can see the there is a single-line label at the
upper left corner, while another wrapped label at the lower right.
Both labels are set to hard wrapping on the fourth character
(MAXLENGTH -4). However, only the longer one seems wrapped correctly.

Since the font displaying is not important here, i have not attached
the font used here.

Below are two more strings for testing, one can just replace the TEXT
with them. In case anyone curious enough, the first 6 characters in
the second string are exactly the same as the first string.
"船湾郊野公园"
"船湾郊野公园 (扩建部份)"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testwrap.png
Type: image/png
Size: 8802 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111214/8030c226/testwrap.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testwrap.map
Type: application/octet-stream
Size: 2351 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111214/8030c226/testwrap.obj


More information about the mapserver-users mailing list