Truetype Font Wrapping Patch
Bart van den Eijnden
BEN at SYNCERA-ITSOLUTIONS.NL
Fri Jun 17 07:18:18 EDT 2005
Hi,
can you open up a bugzilla report in the Mapserver bugzilla so this does not get lost?
Thanks.
Best regards,
Bart
Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG DELFT
tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl
>>> Andrew Seales <andrew.seales at ED.AC.UK> 06/17/05 01:06pm >>>
Hi,
We've been using Minnesota Map Server in a live WMS service for a few
months now and we have found it to be an excellent piece of software. We
have found what seems to be a small problem though. We tried using the
WRAP command inside of LAYER to specify that a text string should wrap
to the next line when it encounters a certain symbol but for some reason
we couldn't get this to work when using truetype fonts. I had a look a
the code and it seems that the line wrapping code in the bitmap font
section wasn't in the truetype font code in mapgd.c. When I added the
code into the truetype font section, then the line wrapping command
worked fine. I've attached a patch of the fix for version 4.6.0.
This is the relevant section of the mapfile:
LAYER
NAME "Copyright"
METADATA
"wms_title" "Copyright"
"wms_srs" "EPSG:27700"
"wms_extent" "0.0 0.0 700000.0 1300000.0"
END
STATUS DEFAULT
TRANSFORM FALSE
TYPE ANNOTATION
POSTLABELCACHE TRUE
FEATURE
POINTS
2 5
END
TEXT '© Crown copyright/database right 2004.|An Ordnance
Survey/EDINA supplied service.'
END
CLASS
STYLE
SYMBOL "copy_box_os"
COLOR 255 255 255
SIZE 30
END
LABEL
BACKGROUNDCOLOR 0 255 255
COLOR 0 0 0
#OUTLINECOLOR 255 255 255
TYPE TRUETYPE
FONT arial
SIZE 7
ANTIALIAS TRUE
PARTIALS TRUE
POSITION CR
WRAP "|"
END
END
MINSCALE 1000.0
MAXSCALE 25000.0
PROJECTION
"init=epsg:27700"
END
END # End copyright
Regards,
--
Andrew Seales
EDINA tel: +44 (0) 131 651 1430
Edinburgh University fax: +44 (0) 131 650 3308
Main Library Building url: http://edina.ac.uk
George Square email: andrew.seales at ed.ac.uk
Edinburgh EH8 9LJ
More information about the mapserver-dev
mailing list