Lines 93-99
First, an 8x8 font must be loaded. To do this, [.filename]#/etc/rc.conf# should
Link Here
|
93 |
|
93 |
|
94 |
[.programlisting] |
94 |
[.programlisting] |
95 |
.... |
95 |
.... |
96 |
font8x8="iso-8x8" # font 8x8 from /usr/shared/syscons/fonts/* (or NO). |
96 |
font8x8="iso-8x8" # font 8x8 from /usr/share/syscons/fonts/* (or NO). |
97 |
.... |
97 |
.... |
98 |
|
98 |
|
99 |
The command to actually switch the mode is man:vidcontrol[1]: |
99 |
The command to actually switch the mode is man:vidcontrol[1]: |
Lines 299-305
References: [.filename]#fonts.txt# in the Ghostscript 4.01 distribution
Link Here
|
299 |
[[type1-fonts-groff]] |
299 |
[[type1-fonts-groff]] |
300 |
== Using Type 1 Fonts with Groff |
300 |
== Using Type 1 Fonts with Groff |
301 |
|
301 |
|
302 |
Now that the new font can be used by both X11 and Ghostscript, how can one use the new font with groff? First of all, since we are dealing with type 1 PostScript(R) fonts, the groff device that is applicable is the _ps_ device. A font file must be created for each font that groff can use. A groff font name is just a file in [.filename]#/usr/shared/groff_font/devps#. With our example, the font file could be [.filename]#/usr/shared/groff_font/devps/SHOWBOAT#. The file must be created using tools provided by groff. |
302 |
Now that the new font can be used by both X11 and Ghostscript, how can one use the new font with groff? First of all, since we are dealing with type 1 PostScript(R) fonts, the groff device that is applicable is the _ps_ device. A font file must be created for each font that groff can use. A groff font name is just a file in [.filename]#/usr/share/groff_font/devps#. With our example, the font file could be [.filename]#/usr/share/groff_font/devps/SHOWBOAT#. The file must be created using tools provided by groff. |
303 |
|
303 |
|
304 |
The first tool is `afmtodit`. This is not normally installed, so it must be retrieved from the source distribution. I found I had to change the first line of the file, so I did: |
304 |
The first tool is `afmtodit`. This is not normally installed, so it must be retrieved from the source distribution. I found I had to change the first line of the file, so I did: |
305 |
|
305 |
|
Lines 324-330
We need to convert them to UNIX(R) style ^J delimited lines
Link Here
|
324 |
tr '\015' '\012' >showboat.afm |
324 |
tr '\015' '\012' >showboat.afm |
325 |
|
325 |
|
326 |
Now create the groff font file |
326 |
Now create the groff font file |
327 |
% cd /usr/shared/groff_font/devps |
327 |
% cd /usr/share/groff_font/devps |
328 |
% /tmp/afmtodit.pl -d DESC -e text.enc /tmp/showboat.afm generate/textmap SHOWBOAT |
328 |
% /tmp/afmtodit.pl -d DESC -e text.enc /tmp/showboat.afm generate/textmap SHOWBOAT |
329 |
.... |
329 |
.... |
330 |
|
330 |
|
Lines 430-436
In the work area, you will need to make the utility. Just type:
Link Here
|
430 |
# make -f Makefile.sub afmtodit |
430 |
# make -f Makefile.sub afmtodit |
431 |
.... |
431 |
.... |
432 |
+ |
432 |
+ |
433 |
You may also need to copy [.filename]#/usr/contrib/groff/devps/generate/textmap# to [.filename]#/usr/shared/groff_font/devps/generate# if it does not already exist. |
433 |
You may also need to copy [.filename]#/usr/contrib/groff/devps/generate/textmap# to [.filename]#/usr/share/groff_font/devps/generate# if it does not already exist. |
434 |
|
434 |
|
435 |
Once all these utilities are in place, you are ready to commence: |
435 |
Once all these utilities are in place, you are ready to commence: |
436 |
|
436 |
|
Lines 469-475
Converting 3of9.ttf to A.pfa and B.afm.
Link Here
|
469 |
|
469 |
|
470 |
. Create the groff PostScript file: |
470 |
. Create the groff PostScript file: |
471 |
+ |
471 |
+ |
472 |
Change directories to [.filename]#/usr/shared/groff_font/devps# so as to make the following command easier to execute. You will probably need root privileges for this. (Or, if you are paranoid about working there, make sure you reference the files [.filename]#DESC#, [.filename]#text.enc# and [.filename]#generate/textmap# as being in this directory.) |
472 |
Change directories to [.filename]#/usr/share/groff_font/devps# so as to make the following command easier to execute. You will probably need root privileges for this. (Or, if you are paranoid about working there, make sure you reference the files [.filename]#DESC#, [.filename]#text.enc# and [.filename]#generate/textmap# as being in this directory.) |
473 |
+ |
473 |
+ |
474 |
[source,bash] |
474 |
[source,bash] |
475 |
.... |
475 |
.... |
Lines 483-489
Where, [.filename]#file.afm# is the _AFM_name_ created by `ttf2pf.ps` above, and
Link Here
|
483 |
% afmtodit -d DESC -e text.enc 3of9.afm generate/textmap 3of9 |
483 |
% afmtodit -d DESC -e text.enc 3of9.afm generate/textmap 3of9 |
484 |
.... |
484 |
.... |
485 |
+ |
485 |
+ |
486 |
Ensure that the resulting _PS_font_name_ file (e.g., [.filename]#3of9# in the example above) is located in the directory [.filename]#/usr/shared/groff_font/devps# by copying or moving it there. |
486 |
Ensure that the resulting _PS_font_name_ file (e.g., [.filename]#3of9# in the example above) is located in the directory [.filename]#/usr/share/groff_font/devps# by copying or moving it there. |
487 |
+ |
487 |
+ |
488 |
Note that if [.filename]#ttf2pf.ps# assigns a font name using the one it finds in the TrueType font file and you want to use a different name, you must edit the [.filename]#.afm# prior to running `afmtodit`. This name must also match the one used in the Fontmap file if you wish to pipe man:groff[1] into man:gs[1]. |
488 |
Note that if [.filename]#ttf2pf.ps# assigns a font name using the one it finds in the TrueType font file and you want to use a different name, you must edit the [.filename]#.afm# prior to running `afmtodit`. This name must also match the one used in the Fontmap file if you wish to pipe man:groff[1] into man:gs[1]. |
489 |
|
489 |
|