docs:gis:mapserver:using_truetype_fonts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

docs:gis:mapserver:using_truetype_fonts [2007/05/03 15:32] – created billhdocs:gis:mapserver:using_truetype_fonts [2008/08/03 00:25] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Using Truetype Fonts with MapServer ======
 +  * create a file called "fontset.txt"; the first item will be the font identifier for reference in your mapfiles, and the second item on each line will be the path to the truetype font file:<code>
 +arial /path/to/font/files/arial.ttf
 +</code>
 +  * reference the fontset.txt file at the beginning of a .map file like this:<code>
 +MAP
 + SIZE 800 600
 + EXTENT -742509 3537635 708118 4538138
 + IMAGECOLOR 153 179 204
 +
 + FONTSET fontset.txt
 +
 + IMAGETYPE PNG24 # - HUGE BUT LOOKS GOOD
 +
 + PROJECTION
 + "proj=merc"
 + "ellps=WGS84"
 + "lat_0=34.24"
 + "lon_0=-111.62"
 + END
 +
 +...
 +</code>
 +  * modify your LABEL section like this (8 is a point size):<code>
 +LABEL
 + TYPE truetype
 + FONT "arial"
 + SIZE 8
 +...
 +</code>
 +  * :!: **make sure the fontset.txt and referenced truetype font files are accessible by your web server**
 +    * if this is not set up correctly, you may be able to make a map with shp2img, but cgi mapserv will fail in a web browser