[Mapserver-users] TrueType symbol problems + development sugg estion for pixmap symbols

Peter.Bruton at CCRS.NRCan.gc.ca Peter.Bruton at CCRS.NRCan.gc.ca
Fri Dec 6 06:59:57 EST 2002


Hello Lars;

I have also had trouble using fonts that originated in MapInfo.  What I
found was that in order for Mapserver to "recognize" a font, the font must
use Windows Unicode character encoding.  You can check the character
encoding of a font by using "Character Map" on your PC.  

I was not able to add character encoding to my MapInfo font using the font
creation software I had.  So I:

- found an existing font that used Windows Unicode character encoding 
- loaded it into my font creation software
- loaded my MapInfo font into my font creation software
- deleted one of the glyphs from the existing font
- copied the required MapInfo glyph
- pasted it into existing font

This worked fine for me.

Have a good day.

Peter Bruton

-----Original Message-----
From: Lars V. Nielsen [mailto:LVN at hvm.dk]
Sent: Friday, December 06, 2002 6:11 AM
To: Mapserver-L
Subject: [Mapserver-users] TrueType symbol problems + development
suggestion for pixmap symbols


Hi List,

I'm getting my grand tour of Mapserver setup/programming, so yet another
question :-)
Also see my development suggestion about pixmap symbols at the bottom.

I'm trying to set both point layers and inline point features to display
with defined symbols. Sofar I've only been succesful with type pixmap.

Primarily, I'm trying to utilize the standard MapInfo symbol fonts, e.g.
"MapInfo Arrows". But I can't seem to make them display. I tried to switch
to "standard" vector symbol "circle", but still no display. However, when I
switch to a pixmap symbol (defined in the same symbol set file), it displays
correctly ! I've also tried to switch to standard Windows TrueType fonts
Webdings and Wingdings, but they don't display either.

What am I doing wrong here ? Please help me out.
Are there any special requirements for the TrueType fonts to be used with
Mapserver ?

Extract of MAP file:
FONTSET   "c:/Mapserver/fontset/fontset.txt"
SYMBOLSET "C:/Mapserver/symbols/symbols.txt"
LAYER
 NAME "myPoints"
 TYPE POINT
 STATUS ON
 FEATURE
  POINTS
   706000 6137000
  END
 END
 CLASS
  SYMBOL "CompassRose"
  SIZE 48
  COLOR 0 0 0
  BACKGROUNDCOLOR -1 -1 -1
  OUTLINECOLOR 0 0 0
 END
END

Extract of Symbols definition (C:/Mapserver/symbols/symbols.txt):
SYMBOL
 NAME CompassRose
 TYPE TRUETYPE
 FONT mapinfo-arrows
 FILLED true
 ANTIALIAS true
 CHARACTER "!"
END

Extract of Fontset file (c:/Mapserver/fontset/fontset.txt):
mapinfo-arrows                  C:/winnt/fonts/ttmiar__.ttf

-- Development suggestion:

The pixmap symbols I'm using depict "tacks", i.e. with a logical insertion
at the tack point. This puts the whole symbol above this point. But
Mapserver won't allow my to position the symbol according to the insertion
point (i.e. POSITION UC), always using the center of the image, which makes
it necessary for me to "double" my symbol picture appending a dummy,
transparent half below the insertion point.

How about adding a POSITION clause to the SYMBOL definition (similar to
LABEL do.) to allow for non-centered pixmap symbols ?

Best regards / Med venlig hilsen
Lars V. Nielsen
--------------------------------------------------------
Hvenegaard & Meklenborg
Rugaardsvej 55, DK-5000 Odense C
Denmark
http://www.hvm.dk




_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list