Fonts and FreeBSD: A Tutorial
Prev |  | Next

# 6 Using type 1 fonts with Ghostscript

Ghostscript references a font via its `Fontmap` file. This must be modified in a similar way to the X11 `fonts.dir` file. Ghostscript can use either the `.pfa` or the `.pfb` format fonts. Using the font from the previous example, here is how to use it with Ghostscript:

    Put the font in Ghostscript's font directory
    % cd /usr/local/share/ghostscript/fonts
    % ln -s /usr/local/share/fonts/type1/showboat.pfb .

    Edit Fontmap so Ghostscript knows about the font
    % cd /usr/local/share/ghostscript/4.01
    % ex Fontmap
    :$a
    /Showboat        (showboat.pfb) ; % From CICA /fonts/atm/showboat
    .
    :wq

    Use Ghostscript to examine the font
    % gs prfont.ps
    Aladdin Ghostscript 4.01 (1996-7-10)
    Copyright (C) 1996 Aladdin Enterprises, Menlo Park, CA.  All rights
    reserved.
    This software comes with NO WARRANTY: see the file PUBLIC for details.
    Loading Times-Roman font from /usr/local/share/ghostscript/fonts/tir_____.pfb...
     /1899520 581354 1300084 13826 0 done.
    GS>Showboat DoFont
    Loading Showboat font from /usr/local/share/ghostscript/fonts/showboat.pfb...
     1939688 565415 1300084 16901 0 done.
    >>showpage, press <return> to continue<<
    >>showpage, press <return> to continue<<
    >>showpage, press <return> to continue<<
    GS>quit

References: `fonts.txt` in the Ghostscript 4.01 distribution

Prev | Home | Next
Using type 1 fonts with X11 |  | Using type 1 fonts with Groff

This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.