In order to support all the MapInfo brush, pen and marker (point) styles it may be required to define additional styles and fonts to be used by MapServer when drawing the features of the layer. The installer of MapManager copies a default font file (font.list) and symbol file (symbols.sym) in the templates subdirectory of the application folder. By editing these files we can add further fonts and symbols to be used when creating a map configuration with MapManager.
The references to the installed fonts should be added to the font.list file. The font.list file is a simple text file containing information about the TrueType fonts available for MapServer. The aliases defined are then used throughout a MapFile to specify which font to use. The aliases are are case sensitive.
The format of the font.list file is very simple. Each line contains 2 items: an alias and the name/path of the font seperated by white space. The alias is simply the name we refer to the font as in our mapfiles (eg. times-bold). The name is the actual name of the TrueType file. If the file path is not specified then it is interpreted as relative to the location of the fontset. Here's an example of the MapInfo related fontset entries:
map-symbols C:\WINDOWS\Fonts\Mapsym.ttf
mapinfo-miscellaneous C:\WINDOWS\Fonts\Ttmimi__.ttf
mapinfo-cartographic C:\WINDOWS\Fonts\TTMICG__.TTF
mapinfo-arrows C:\WINDOWS\Fonts\Ttmiar__.ttf
mapinfo-dispersed-groups C:\WINDOWS\Fonts\MapInfo_dispersed_groups.ttf
mapinfo-oil&gas C:\WINDOWS\Fonts\Ttmiog__.ttf
mapinfo-real-estate C:\WINDOWS\Fonts\Ttmire__.ttf
mapinfo-shields C:\WINDOWS\Fonts\MAPIS___.TTF
mapinfo-streetpro C:\WINDOWS\Fonts\mapisp__.ttf
mapinfo-streetpro-unicode C:\WINDOWS\Fonts\Mapispu0.ttf
mapinfo-symbols C:\WINDOWS\Fonts\TTMIOS__.TTF
mapinfo-transportation C:\WINDOWS\Fonts\Ttmitc__.ttf
mapinfo-weather C:\WINDOWS\Fonts\Ttmiwe__.ttf
To support some application specific or custom styles it may be required to extend the current set of symbols by adding new symbol definitions. The symbols define how the lines, polygons and points being rendered by MapServer. The symbols are used to define the line and brush patterns and the outline of the point (marker) features.
When using the OGR auto style option, pre-defined symbol names should exist in order to support rendering all the styles contained by the layer. For more information about the pre-defined symbol names see Mapping OGR Feature Styles to Layer Styles.
The symbol definitions should be located in the symbolset file (symbols.sym) see the example below:
SYMBOL
NAME 'mapinfo-brush-137'
TYPE VECTOR
FILLED TRUE
POINTS
12 12
12 15
15 15
15 12
12 12
END
END
Alternatively we can add the symbol definition directly into the mapfile (inline symbols) within the MAP section, like:
MAP
...
SYMBOL
NAME 'mapinfo-pen-14'
TYPE SIMPLE
PATTERN 11 5 1 5 END
END
...
END
Note: The symbol name convention 'mapinfo-pen-nnn' or 'mapinfo-brush-nnn' where nnn is the fill pattern number as defined by MapInfo Professional means that when "Auto Style" is checked for a MapServer layer that uses a MapInfo TAB file that pen or brush style will be assigned to any feature that has a native MapInfo style defined by 'mapinfo-pen-nnn' and/or 'mapinfo-brush-nnn'.
The TrueType symbols are essential for example when defining the MapInfo point symbols (mapinfo-sym-...). To define the symbol the character code should be identified and the following symbol definition can be used:
SYMBOL
NAME "mapinfo-sym-67"
TYPE TRUETYPE
FONT "mapinfo-miscellaneous"
CHARACTER "C"
ANTIALIAS TRUE
GAP 10
END
Note: The character code can be used directly in the definition according to the following convention: CHARACTER "C"
For more information about the symbol definitions see: MapServer SYMBOL reference.