Source string Read only

(itstool) path: listitem/para
562/5620
Context English State
<lineannotation>Create the .pfa font file</lineannotation>
<prompt>%</prompt> <userinput>pfbtops /usr/local/share/fonts/type1/showboat.pfb &gt;showboat.pfa</userinput>
Of course, if <filename>.pfa</filename> is already available, just use a symbolic link to reference it.
<lineannotation>Get the internal font name</lineannotation>
<prompt>%</prompt> <userinput>fgrep internalname SHOWBOAT</userinput>
internalname Showboat

<lineannotation>Tell groff that the font must be downloaded</lineannotation>
<prompt>%</prompt> <userinput>ex download
:$a
Showboat showboat.pfa
.
:wq</userinput>
To test the font:
<prompt>%</prompt> <userinput>cd /tmp</userinput>
<prompt>%</prompt> <userinput>cat &gt;example.t &lt;&lt;EOF
.sp 5
.ps 16
This is an example of the Showboat font:
.br
.ps 48
.vs (\n(.s+2)p
.sp
.ft SHOWBOAT
ABCDEFGHI
.br
JKLMNOPQR
.br
STUVWXYZ
.sp
.ps 16
.vs (\n(.s+2)p
.fp 5 SHOWBOAT
.ft R
To use it for the first letter of a paragraph, it will look like:
.sp 50p
\s(48\f5H\s0\fRere is the first sentence of a paragraph that uses the
showboat font as its first letter.
Additional vertical space must be used to allow room for the larger
letter.
EOF</userinput>
<prompt>%</prompt> <userinput>groff -Tps example.t &gt;example.ps</userinput>

<lineannotation>To use ghostscript/ghostview</lineannotation>
<prompt>%</prompt> <userinput>ghostview example.ps</userinput>

<lineannotation>To print it</lineannotation>
<prompt>%</prompt> <userinput>lpr -Ppostscript example.ps</userinput>
References: <filename>/usr/src/gnu/usr.bin/groff/afmtodit/afmtodit.man</filename>, <citerefentry><refentrytitle>groff_font</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>groff_char</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>pfbtops</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
Converting TrueType Fonts to a groff/PostScript Format For groff
This potentially requires a bit of work, simply because it depends on some utilities that are not installed as part of the base system. They are:
<command>ttf2pf</command>
TrueType to PostScript conversion utilities. This allows conversion of a TrueType font to an ascii font metric (<filename>.afm</filename>) file.
Currently available at <uri xlink:href="http://sunsite.icm.edu.pl/pub/GUST/contrib/BachoTeX98/ttf2pf/">http://sunsite.icm.edu.pl/pub/GUST/contrib/BachoTeX98/ttf2pf/</uri>. Note: These files are PostScript programs and must be downloaded to disk by holding down <keycap>Shift</keycap> when clicking on the link. Otherwise, your browser may try to launch <application>ghostview</application> to view them.
The files of interest are:
<filename>GS_TTF.PS</filename>
<filename>PF2AFM.PS</filename>
<filename>ttf2pf.ps</filename>
The funny upper/lower case is due to their being intended also for DOS shells. <filename>ttf2pf.ps</filename> makes use of the others as upper case, so any renaming must be consistent with this. (Actually, <filename>GS_TTF.PS</filename> and <filename>PFS2AFM.PS</filename> are supposedly part of the <application>Ghostscript</application> distribution, but it is just as easy to use these as an isolated utility. FreeBSD does not seem to include the latter.) You also may want to have these installed to <filename>/usr/local/share/groff_font/devps</filename>(?).
<command>afmtodit</command>
Creates font files for use with <application>groff</application> from ascii font metrics file. This usually resides in the directory, <filename>/usr/src/contrib/groff/afmtodit</filename>, and requires some work to get going.
If you are paranoid about working in the <filename>/usr/src</filename> tree, simply copy the contents of the above directory to a work location.
In the work area, you will need to make the utility. Just type:
<prompt>#</prompt> <userinput>make -f Makefile.sub afmtodit</userinput>
You may also need to copy <filename>/usr/contrib/groff/devps/generate/textmap</filename> to <filename>/usr/share/groff_font/devps/generate</filename> if it does not already exist.
Once all these utilities are in place, you are ready to commence:
Create <filename>.afm</filename> by typing:
<prompt>%</prompt> <userinput>gs -dNODISPLAY -q -- ttf2pf.ps <replaceable>TTF_name</replaceable> <replaceable>PS_font_name</replaceable> <replaceable>AFM_name</replaceable></userinput>
Where, <replaceable>TTF_name</replaceable> is your TrueType font file, <replaceable>PS_font_name</replaceable> is the file name for <filename>.pfa</filename>, <replaceable>AFM_name</replaceable> is the name you wish for <filename>.afm</filename>. If you do not specify output file names for the <filename>.pfa</filename> or <filename>.afm</filename> files, then default names will be generated from the TrueType font file name.
This also produces a <filename>.pfa</filename>, the ascii PostScript font metrics file (<filename>.pfb</filename> is for the binary form). This will not be needed, but could (I think) be useful for a fontserver.
For example, to convert the 30f9 Barcode font using the default file names, use the following command:
<prompt>%</prompt> <userinput>gs -dNODISPLAY -- ttf2pf.ps 3of9.ttf</userinput>
Aladdin Ghostscript 5.10 (1997-11-23)
Copyright (C) 1997 Aladdin Enterprises, Menlo Park, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Converting 3of9.ttf to 3of9.pfa and 3of9.afm.
If you want the converted fonts to be stored in <filename>A.pfa</filename> and <filename>B.afm</filename>, then use this command:
<prompt>%</prompt> <userinput>gs -dNODISPLAY -- ttf2pf.ps 3of9.ttf A B</userinput>
Aladdin Ghostscript 5.10 (1997-11-23)
Copyright (C) 1997 Aladdin Enterprises, Menlo Park, CA. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Converting 3of9.ttf to A.pfa and B.afm.

Loading…

No matching activity found.

Browse all component changes

Glossary

English English
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: listitem/para
Flags
read-only
Source string location
article.translate.xml:735
String age
a year ago
Source string age
a year ago
Translation file
articles/fonts.pot, string 114