We wanted to use a different font for mapserver which is Microsoft Yahei instead of zysong. Apparently, mapserver have some issues with path problems or with the ttf having more than one word as a font name.

Thanks to Martin Hosken’s perl modules for fonts, we were able to rename the Microsoft Yahei TTF to msyh.ttf.

  1. Download: (a) Font-TTF-0.45 (b) Font-TTF-Scripts-0.11.1

  2. Unzip

#perl Makefile.pl
#make
#make install
  1. ttfname
rupert:Desktop rupert$ ttfname
Usage:
ttfname [-f "full_name"] -n "name" [-t num] [-q] infile.ttf outfile.ttf 
Renames the TTF with the given name and outputs the newly named font to out.ttf.
Options:
      -f "name"   specifies new full name (optional) as opposed to the
                  default calculated form.
      -l lang     language number to use (default all langs)
                  if specified name entries will be added for all platforms and
                      encodings covered by the cmap if not already there
      -n "name"   specifies new font family name (not optional)
      -q          disable signon message
      -s filename overrides -n and gets string from file. Useful for -t
      -t num      overrides the normal naming areas to change another
                  string -f becomes inactive.
#ttfname -f "Microsoft YaHei" -n "msyh" Microsoft\ YaHei.ttf msyh.ttf

Picture 1.png