groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Getting a font and adding it in grops


From: Werner LEMBERG
Subject: Re: [Groff] Getting a font and adding it in grops
Date: Sun, 29 Jul 2007 15:43:03 +0200 (CEST)

> Hello. I have acquired some troff code that uses a font Helvetica
> Black, code HK.  I'd like to know where I can get the font for FREE,

I don't know which free font can be used in stead of this one.  Is it
really necessary to use *exactly* the same shape?  Otherwise I suggest
that you look up font sites in the internet, trying to find a free
font which looks similar to it.

> and how can I add it to grops' library of fonts?

Below you can find what the man page of grops (in the CVS of groff)
says about font installation.  This topic comes up from time to time
on the list, so searching in the archive should give you further help.


    Werner


======================================================================


FONT INSTALLATION
       This section gives a summary of the above explanations; it can serve as
       a step-by-step font installation guide for grops.

        ·  Convert your font to something groff understands.  This is either a
           PostScript Type 1 font in PFA format or a PostScript Type 42  font,
           together with an AFM file.

           The very first characters in a PFA file look like this:

                  %!PS-AdobeFont-1.0:

           A  PFB file has this also in the first line, but the string is pre-
           ceded with some binary bytes.

           The very first characters in a Type 42 font file look like this:

                  %!PS-TrueTypeFont

           This is a wrapper format for TrueType fonts.  Old PS printers might
           not  support  it (this is, they don't have a built-in TrueType font
           interpreter).

           If your font is in PFB format (such fonts normally have  `.pfb'  as
           the  file  extension),  you might use groff's pfbtops(1) program to
           convert it to PFA.  For TrueType fonts, try ttftot42 or  fontforge.
           For  all  other  font  formats use fontforge which can convert most
           outline font formats.

        ·  Convert the AFM file to a groff  font  description  file  with  the
           afmtodit(1) program.  An example call is

                  afmtodit Foo-Bar-Bold.afm textmap FBB

           which converts the metric file `Foo-Bar-Bold.afm' to the groff font
           `FBB'.  If you have a font family which comes  with  normal,  bold,
           italic, and bold italic faces, it is recommended to use the letters
           R, B, I, and BI, respectively, as postfixes in the groff font names
           to  make groff's `.fam' request work.  An example is groff's built-
           in Times-Roman font: The font family name is T, and the groff  font
           names are TR, TB, TI, and TBI.

        ·  Install  both  the  groff font description files and the fonts in a
           `devps' subdirectory of the font path which groff finds.   See  the
           ENVIRONMENT section in the troff(1) man page which lists the actual
           value of the font path.  Note that groff doesn't use the AFM  files
           (but it is a good idea to store them anyway).

        ·  Register  all  fonts which must be downloaded to the printer in the
           `devps/download' file.  Only the first occurrence of this  file  in
           the font path is read.  This means that you should copy the default
           `download' file to the first directory in your font  path  and  add
           your fonts there.  To continue the above example we assume that the
           PS font name for Foo-Bar-Bold.pfa is `XY-Foo-Bar-Bold' (the PS font
           name  is  stored in the internalname field in the `FBB' file), thus
           the following line should be added to `download'.

                  XY-Foo-Bar-Bold Foo-Bar-Bold.pfa




reply via email to

[Prev in Thread] Current Thread [Next in Thread]