Source string Read only

(itstool) path: informalexample/programlisting
70/700
Context English State
Driver
vt
<filename>.hex</filename>
syscons
<filename>.fnt</filename>
Application
<application>Ghostscript</application>
<filename>.pfa</filename>, <filename>.pfb</filename>, <filename>.ttf</filename>
<application>X11</application>
<application>Groff</application>
<filename>.pfa</filename>, <filename>.afm</filename>
<application>Povray</application>
The <filename>.fnt</filename> suffix is used quite frequently. I suspect that whenever someone wanted to create a specialized font file for their application, more often than not they chose this suffix. Therefore, it is likely that files with this suffix are not all the same format; specifically, the <filename>.fnt</filename> files used by syscons under FreeBSD may not be the same format as a <filename>.fnt</filename> one encounters in the <trademark class="registered">MS-DOS</trademark>/<trademark class="registered">Windows</trademark> environment. I have not made any attempt at using other <filename>.fnt</filename> files other than those provided with FreeBSD.
Setting a Virtual Console to 80x60 Line Mode
First, an 8x8 font must be loaded. To do this, <filename>/etc/rc.conf</filename> should contain the line (change the font name to an appropriate one for your locale):
font8x8="iso-8x8" # font 8x8 from /usr/share/syscons/fonts/* (or NO).
The command to actually switch the mode is <citerefentry><refentrytitle>vidcontrol</refentrytitle><manvolnum>1</manvolnum></citerefentry>:
<prompt>%</prompt> <userinput>vidcontrol VGA_80x60</userinput>
Various screen-oriented programs, such as <citerefentry><refentrytitle>vi</refentrytitle><manvolnum>1</manvolnum></citerefentry>, must be able to determine the current screen dimensions. As this is achieved this through <command>ioctl</command> calls to the console driver (such as <citerefentry><refentrytitle>syscons</refentrytitle><manvolnum>4</manvolnum></citerefentry>) they will correctly determine the new screen dimensions.
To make this more seamless, one can embed these commands in the startup scripts so it takes place when the system boots. To do this is add this line to <filename>/etc/rc.conf</filename>.
allscreens_flags="VGA_80x60" # Set this vidcontrol mode for all virtual screens
References: <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>vidcontrol</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
Using Type 1 Fonts with <application>X11</application>
<application>X11</application> can use either the <filename>.pfa</filename> or the <filename>.pfb</filename> format fonts. The <application>X11</application> fonts are located in various subdirectories under <filename>/usr/X11R6/lib/X11/fonts</filename>. Each font file is cross referenced to its <application>X11</application> name by the contents of <filename>fonts.dir</filename> in each directory.
There is already a directory named <filename>Type1</filename>. The most straight forward way to add a new font is to put it into this directory. A better way is to keep all new fonts in a separate directory and use a symbolic link to the additional font. This allows one to more easily keep track of ones fonts without confusing them with the fonts that were originally provided. For example:
<lineannotation>Create a directory to contain the font files</lineannotation>
<prompt>%</prompt> <userinput>mkdir -p /usr/local/share/fonts/type1</userinput>
<prompt>%</prompt> <userinput>cd /usr/local/share/fonts/type1</userinput>

<lineannotation>Place the .pfa, .pfb and .afm files here</lineannotation>
<lineannotation>One might want to keep readme files, and other documentation</lineannotation>
<lineannotation>for the fonts here also</lineannotation>
<prompt>%</prompt> <userinput>cp /cdrom/fonts/atm/showboat/showboat.pfb .</userinput>
<prompt>%</prompt> <userinput>cp /cdrom/fonts/atm/showboat/showboat.afm .</userinput>

<lineannotation>Maintain an index to cross reference the fonts</lineannotation>
<prompt>%</prompt> <userinput>echo showboat - InfoMagic CICA, Dec 1994, /fonts/atm/showboat &gt;&gt;INDEX</userinput>
Now, to use a new font with <application>X11</application>, one must make the font file available and update the font name files. The <application>X11</application> font names look like:
-bitstream-charter-medium-r-normal-xxx-0-0-0-0-p-0-iso8859-1
| | | | | | | | | | | | \ \
| | | | | \ \ \ \ \ \ \ +----+- character set
| | | | \ \ \ \ \ \ \ +- average width
| | | | \ \ \ \ \ \ +- spacing
| | | \ \ \ \ \ \ +- vertical res.
| | | \ \ \ \ \ +- horizontal res.
| | | \ \ \ \ +- points
| | | \ \ \ +- pixels
| | | \ \ \
foundry family weight slant width additional style
A new name needs to be created for each new font. If you have some information from the documentation that accompanied the font, then it could serve as the basis for creating the name. If there is no information, then you can get some idea by using <citerefentry><refentrytitle>strings</refentrytitle><manvolnum>1</manvolnum></citerefentry> on the font file. For example:
<prompt>%</prompt> <userinput>strings showboat.pfb | more</userinput>
%!FontType1-1.0: Showboat 001.001
%%CreationDate: 1/15/91 5:16:03 PM
%%VMusage: 1024 45747
% Generated by Fontographer 3.1
% Showboat
1991 by David Rakowski. Alle Rechte Vorbehalten.
FontDirectory/Showboat known{/Showboat findfont dup/UniqueID known{dup
/UniqueID get 4962377 eq exch/FontType get 1 eq and}{pop false}ifelse
{save true}{false}ifelse}{false}ifelse
12 dict begin
/FontInfo 9 dict dup begin
/version (001.001) readonly def
/FullName (Showboat) readonly def
/FamilyName (Showboat) readonly def
/Weight (Medium) readonly def
/ItalicAngle 0 def
/isFixedPitch false def
/UnderlinePosition -106 def
/UnderlineThickness 16 def
/Notice (Showboat
1991 by David Rakowski. Alle Rechte Vorbehalten.) readonly def
end readonly def
/FontName /Showboat def
--stdin--
Using this information, a possible name might be:

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: informalexample/programlisting
Flags
ignore-same, no-wrap, read-only
Source string location
article.translate.xml:273
String age
a year ago
Source string age
a year ago
Translation file
articles/fonts.pot, string 50