4mBDF2PSF24m(1)                Console-setup User's Manual               4mBDF2PSF24m(1)

1mNAME0m
       bdf2psf - convert a BDF font to PSF format for the Linux console


1mSYNOPSIS0m
       1mbdf2psf [--fb] [--log 4m22mlogfile24m1m] 4m22mbdf24m1m{+4m22mbdf24m1m} 4m22mequivalence24m1m{+4m22mequivalence24m1m} 4m22msym-0m
       4mbols24m1m{+[:]4m22msymbols24m1m} 4m22msize24m 4mpsf24m 1m[4m22msfm24m1m]0m


1mDESCRIPTION0m
       The  program  1mbdf2psf  22mtranslates  BDF  fonts to PSF format. It accepts
       fonts with arbitrary size of the font matrix. If the width of the glyph
       matrix of the source font is 7 or 9 pixels then it generates fonts with
       width of 8 pixels.


1mOPTIONS0m
       --fb   Generate font for framebuffer. There are two  important  differ-
              ences  between  the  framebuffer  and  the text mode. First, all
              fonts in text mode have to have matrix 8 pixels width. They also
              have to have either 256 or 512  glyphs.  Second,  in  most  text
              modes  the  hardware  does  some  magic in order to use 8 pixels
              width fonts as if they were 9 pixels width. In order to  achieve
              this  the video hardware copies the 8th column in the 9th column
              of the glyphs with codes from 0xC0 to 0xDF  and  from  0x1C0  to
              0x1DF.   1mBdf2psf  22mis very careful when deciding where to place a
              particular glyph and as a result the encoding of  the  generated
              font is more or less arbitrary.


       --log logfile
              Record in the file 4mlogfile24m any problems during the conversion.


       bdf{+bdf}
              The "+"-separated list of the source BDF font(s). When a partic-
              ular  symbol  is defined in more than one of the specified fonts
              then fonts listed first take precedence.


       equivalence{+equivalence}
              A "+"-separated list of files defining an  equivalence  relation
              between the glyphs. See the section EQUIVALENCE FILES below.


       symbols{+[:]symbols}
              A  "+"-separated  list  of files describing character sets.  The
              generated font will support all specified character sets.   When
              there is no space in the PSF font for all symbols, the character
              sets  listed first take precedence.  When a colon before a char-
              acter set is specified no warnings will be  issued  for  symbols
              that  could not be placed in the font. See the section CHARACTER
              SETS below.


       size   The size of the PSF font. Usually 256 or 512 glyphs.


       psf    The name of the generated font.  If a file with  this  name  al-
              ready exists it will be overwritten.


       sfm    Save in the file 1msfm 22mthe SFM of the generated font. This parame-
              ter is optional.


1mCHARACTER SETS0m
       The  encodings  of the traditional console fonts a similar to the stan-
       dard encodings of the different languages.  For example there are fonts
       for all variants of ISO 8859.   This  is  redundant,  for  example  ISO
       8859-1,  ISO  8859-9  and ISO 8859-15 differ only by few characters and
       can be easily covered by only one font.

       In order to determine the minimal set of character  sets  a  clustering
       algorithm  has  been used. The source code of 1mfontconfig 22mcontains lists
       of the characters that most languages require - one list per  language.
       We  started with one character set per language and used the clustering
       algorithm in order to join the character sets to bigger.  The character
       sets described in files installed in the directory  4mfontsets24m  were  the
       result  of the algorithm.  These files list the unicodes of the symbols
       of the character set, one per line. Comments starting with a sharp sign
       are also allowed.

       The files 4mascii.set24m, 4mlinux.set24m, 4mfreebsd.set24m and 4museful.set24m contain four
       special character sets.  The first lists the ASCII symbols and the sec-
       ond and the third list the symbols from the so called alternate charac-
       ter set (see section "Line Graphics" of 1mterminfo22m(5)) -  one  for  Linux
       and one for FreeBSD.  Notice that in order to limit itself to the cp437
       character set, the Linux console driver does some approximations of the
       symbols  from the alternate character set. For example it prints U+256A
       (BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL  DOUBLE)  instead  of  the
       not-equal  sign. The file linux.set lists the symbols used by the Linux
       console driver (i.e. U+256A instead of the not-equal sign).   The  sym-
       bols  from  freebsd.set  are not fixed by the FreeBSD kernel, but there
       too there are some approximations.

       In most cases there is more available space in the  fonts  than  neces-
       sary.  The  spare  codes  can  be filled with the symbols from the 4muse-0m
       4mful.set24m special character set.  It is convenient to use a colon  before
       the  name  of  4museful.set24m on the command line of 1mbdf2psf 22mso no warnings
       are issued when there is no space in the font for some  of  these  sym-
       bols.


1mEQUIVALENCE FILES0m
       The  equivalence files define an equivalence relation between unicodes.
       The sharp sign is used for comments, the empty lines are  ignored.  All
       other  lines  should list two or more unicodes.  Only one glyph will be
       allocated in the PSF font for these unicodes.

       Example:

            U+2126 U+03A9
            # U+2126:   OHM SIGN
            # U+03A9:   GREEK CAPITAL LETTER OMEGA
            U+041D U+0048
            # U+041D:   CYRILLIC CAPITAL LETTER EN
            # U+0048:   LATIN CAPITAL LETTER H

       This equivalence file says  that  U+2126  (the  Ohm  sign)  and  U+03A9
       (Omega)  have  the  same look so only one glyph is enough for them. And
       also U+041D (Cyrillic En) and U+0048 (Latin H) look the same.

       Two equivalence files are  provided  -  4mstandard.equivalents24m  and  4mara-0m
       4mbic.equivalents.24m  The first one can be used for all fonts.  The purpose
       of  the  second is to reduce the number of the necessary glyphs for the
       Arabic letters at the cost of the font quality.  It should be used only
       for fonts that have to support Arabic but there is not enough space  in
       the  PSF  font  for all Arabic characters.  The 1mUni1 22mcharacter set is a
       character set that requires 4marabic.equivalents.0m


1mFILES0m
       All  mentioned  files  and  directories  are   usually   installed   in
       4m/usr/share/bdf2psf24m or 4m/usr/local/share/bdf2psf.0m


1mAUTHOR0m
       Anton Zinoviev <anton@lml.bas.bg>

console-setup                     2006-01-16                        4mBDF2PSF24m(1)
