Differences
This shows you the differences between two versions of the page.
docs:gis:mapserver:using_truetype_fonts [2007/05/03 15:32] – created billh | docs: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 " | ||
+ | arial / | ||
+ | </ | ||
+ | * reference the fontset.txt file at the beginning of a .map file like this:< | ||
+ | MAP | ||
+ | SIZE 800 600 | ||
+ | EXTENT -742509 3537635 708118 4538138 | ||
+ | IMAGECOLOR 153 179 204 | ||
+ | |||
+ | FONTSET fontset.txt | ||
+ | |||
+ | IMAGETYPE PNG24 # - HUGE BUT LOOKS GOOD | ||
+ | |||
+ | PROJECTION | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | END | ||
+ | |||
+ | ... | ||
+ | </ | ||
+ | * modify your LABEL section like this (8 is a point size):< | ||
+ | LABEL | ||
+ | TYPE truetype | ||
+ | FONT " | ||
+ | SIZE 8 | ||
+ | ... | ||
+ | </ | ||
+ | * :!: **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 | ||