Fonts

Adding extra fonts to Ghostscripot

Fondu Installation

cd /extra/src
wget http://fondu.sourceforge.net/fondu_src-060102.tgz
tar zxf fondu_src-060102.tgz
cd fonduc-060102

Found a glitch in Makefile.in at the very beginning. prefix is incorrectly labeled wilprefix which causes the configure to ignore --prefix. Not only does it ignore that flag if you want to install someplace specific, it also does not install properly to the default /usr/local. Recommend fixing it:

sed  's/wilprefix/prefix/' Makefile.in >Makefile.tmp && mv Makefile.tmp Makefile.in

Configure, build and install:

./configure
make
make install

Microsoft Core Fonts

cd /extra/src
mkdir msfonts
cd msfonts

Download the font .EXE files:

wget http://softlayer.dl.sourceforge.net/project/corefonts/the%20fonts/final/arial32.exe
wget http://softlayer.dl.sourceforge.net/project/corefonts/the%20fonts/final/arialb32.exe
wget http://softlayer.dl.sourceforge.net/project/corefonts/the%20fonts/final/comic32.exe
wget http://softlayer.dl.sourceforge.net/project/corefonts/the%20fonts/final/georgi32.exe
wget http://softlayer.dl.sourceforge.net/project/corefonts/the%20fonts/final/times32.exe
wget http://softlayer.dl.sourceforge.net/project/corefonts/the%20fonts/final/trebuc32.exe
wget http://softlayer.dl.sourceforge.net/project/corefonts/the%20fonts/final/verdan32.exe
wget http://softlayer.dl.sourceforge.net/project/corefonts/the%20fonts/final/wd97vwr32.exe
wget http://softlayer.dl.sourceforge.net/project/corefonts/the%20fonts/final/webdin32.exe

Use cabextract to extract the TTF files from the .EXE files:

cabextract -F *.TTF *.exe

Move the TTF files into Ghostscripts font folder:

mv *.TTF /usr/local/share/ghostscript/fonts
mv *.ttf /usr/local/share/ghostscript/fonts

Perl script to create a /usr/local/share/ghostscript/fonts/Fontmap (requires ttf2pt1). Create a Perl script, /extra/src/msfonts/fontmap.pl:

#!/usr/bin/perl
# ttfontmap -- generate fontmap file for TrueType fonts
my $directory=shift || print STDERR "Usage: ttfontmap {directory}\n";

$directory=~s/\/$//;

for my $fontname ( glob ( "$directory/*.[tT][tT][fF]" ) ) {
  open ( R, "sh -c "ttf2pt1 -A $fontname - 2>/dev/null" |" );
  while ( <R> ) {
    if ( $_ =~ /^FontName/ ) {
      s/^FontName\s*//;
      chomp;
      print "/" . $_ . " ($fontname);\n" ;
    }
  }
  close R;
}

To run it:

perl /extra/src/msfonts/fontmap.pl /usr/local/share/ghostscript/fonts > /usr/local/share/ghostscript/fonts/Fontmap

Recent Updates

  • 2 years 2 days ago
  • 2 years 2 days ago
  • 2 years 4 days ago
    php 8.x
  • 2 years 5 days ago
    10.6.7
  • 2 years 1 week ago
    Drop Centos 5/6 stuff