1BDF2PSF(1)                Console-setup User's Manual               BDF2PSF(1)
2
3
4

NAME

6       bdf2psf - convert a BDF font to PSF format for the Linux console
7
8

SYNOPSIS

10       bdf2psf [--fb] [--log logfile] bdf{+bdf} equivalence{+equivalence} sym‐
11       bols{+[:]symbols} size psf [sfm]
12
13

DESCRIPTION

15       The program bdf2psf translates BDF fonts  to  PSF  format.  It  accepts
16       fonts with arbitrary size of the font matrix. If the width of the glyph
17       matrix of the source font is 7 or 9 pixels then it generates fonts with
18       width of 8 pixels.
19
20

OPTIONS

22       --fb   Generate  font  for framebuffer. There are two important differ‐
23              ences between the framebuffer and  the  text  mode.  First,  all
24              fonts in text mode have to have matrix 8 pixels width. They also
25              have to have either 256 or 512  glyphs.  Second,  in  most  text
26              modes  the  hardware  does  some  magic in order to use 8 pixels
27              width fonts as if they were 9 pixels width. In order to  achieve
28              this  the video hardware copies the 8th column in the 9th column
29              of the glyphs with codes from 0xC0 to 0xDF  and  from  0x1C0  to
30              0x1DF.   Bdf2psf  is very careful when deciding where to place a
31              particular glyph and as a result the encoding of  the  generated
32              font is more or less arbitrary.
33
34
35       --log logfile
36              Record in the file logfile any problems during the conversion.
37
38
39       bdf{+bdf}
40              The "+"-separated list of the source BDF font(s). When a partic‐
41              ular symbol is defined in more than one of the  specified  fonts
42              then fonts listed first take precedence.
43
44
45       equivalence{+equivalence}
46              A  "+"-separated  list of files defining an equivalence relation
47              between the glyphs. See the section EQUIVALENCE FILES below.
48
49
50       symbols{+[:]symbols}
51              A "+"-separated list of files describing  character  sets.   The
52              generated  font will support all specified character sets.  When
53              there is no space in the PSF font for all symbols, the character
54              sets  listed first take precedence.  When a colon before a char‐
55              acter set is specified no warnings will be  issued  for  symbols
56              that  could not be placed in the font. See the section CHARACTER
57              SETS below.
58
59
60       size   The size of the PSF font. Usually 256 or 512 glyphs.
61
62
63       psf    The name of the generated  font.   If  a  file  with  this  name
64              already exists it will be overwritten.
65
66
67       sfm    Save in the file sfm the SFM of the generated font. This parame‐
68              ter is optional.
69
70

CHARACTER SETS

72       The encodings of the traditional console fonts a similar to  the  stan‐
73       dard encodings of the different languages.  For example there are fonts
74       for all variants of ISO 8859.   This  is  redundant,  for  example  ISO
75       8859-1,  ISO  8859-9  and ISO 8859-15 differ only by few characters and
76       can be easily covered by only one font.
77
78       In order to determine the minimal set of character  sets  a  clustering
79       algorithm  has  been used. The source code of fontconfig contains lists
80       of the characters that most languages require - one list per  language.
81       We  started with one character set per language and used the clustering
82       algorithm in order to join the character sets to bigger.  The character
83       sets  described  in  files installed in the directory fontsets were the
84       result of the algorithm.  These files list the unicodes of the  symbols
85       of the character set, one per line. Comments starting with a sharp sign
86       are also allowed.
87
88       The files ascii.set, linux.set, freebsd.set and useful.set contain four
89       special character sets.  The first lists the ASCII symbols and the sec‐
90       ond and the third list the symbols from the so called alternate charac‐
91       ter  set  (see  section "Line Graphics" of terminfo(5)) - one for Linux
92       and one for FreeBSD.  Notice that in order to limit itself to the cp437
93       character set, the Linux console driver does some approximations of the
94       symbols from the alternate character set. For example it prints  U+256A
95       (BOX  DRAWINGS  VERTICAL  SINGLE  AND HORIZONTAL DOUBLE) instead of the
96       not-equal sign. The file linux.set lists the symbols used by the  Linux
97       console  driver  (i.e. U+256A instead of the not-equal sign).  The sym‐
98       bols from freebsd.set are not fixed by the FreeBSD  kernel,  but  there
99       too there are some approximations.
100
101       In  most  cases  there is more available space in the fonts than neces‐
102       sary. The spare codes can be filled with  the  symbols  from  the  use‐
103       ful.set  special character set.  It is convenient to use a colon before
104       the name of useful.set on the command line of bdf2psf  so  no  warnings
105       are  issued  when  there is no space in the font for some of these sym‐
106       bols.
107
108

EQUIVALENCE FILES

110       The equivalence files define an equivalence relation between  unicodes.
111       The  sharp  sign is used for comments, the empty lines are ignored. All
112       other lines should list two or more unicodes.  Only one glyph  will  be
113       allocated in the PSF font for these unicodes.
114
115       Example:
116
117            U+2126 U+03A9
118            # U+2126:   OHM SIGN
119            # U+03A9:   GREEK CAPITAL LETTER OMEGA
120            U+041D U+0048
121            # U+041D:   CYRILLIC CAPITAL LETTER EN
122            # U+0048:   LATIN CAPITAL LETTER H
123
124       This  equivalence  file  says  that  U+2126  (the  Ohm sign) and U+03A9
125       (Omega) have the same look so only one glyph is enough  for  them.  And
126       also U+041D (Cyrillic En) and U+0048 (Latin H) look the same.
127
128       Two  equivalence  files  are  provided  - standard.equivalents and ara‐
129       bic.equivalents.  The first one can be used for all fonts.  The purpose
130       of  the  second is to reduce the number of the necessary glyphs for the
131       Arabic letters at the cost of the font quality.  It should be used only
132       for  fonts that have to support Arabic but there is not enough space in
133       the PSF font for all Arabic characters.  The Uni1 character  set  is  a
134       character set that requires arabic.equivalents.
135
136

FILES

138       All   mentioned   files   and  directories  are  usually  installed  in
139       /usr/share/bdf2psf or /usr/local/share/bdf2psf.
140
141

AUTHOR

143       Anton Zinoviev <anton@lml.bas.bg>
144
145
146
147console-setup                     2006-01-16                        BDF2PSF(1)
Impressum