Provided by: hxtools_20200126-1build1_amd64 bug


       vfontas — a bitmap font file transformation utility


       vfontas commands...


       -canvas xsize ysize


       -crop xpos ypos width height





       -loadclt directory/

       -loadfnt mu.fnt

       -loadhex unicode.hex

       -loadmap cp437AB.uni

       -loadpsf ter-v32b.psfu

       -savebdf out.bdf fontname

       -saveclt outdir/

       -savefnt x.fnt

       -savepbm outdir/

       -savepsf new.psfu

       -savesfd new.sfd

       -upscale xscale yscale

       -xbrz factor

       -xcpi ega437.cpi outdir/

       -xlat xoffset yoffset


       vfontas  (originally "VGA font file assembler") can transform raster font files in various

       Initializes the memory buffer with 256 empty 8x16 glyphs. The primary purpose for this  is
       with  saveclt  to  get blank glyph files for hand-editing. For a differently-sized canvas,
       combine with -crop or -canvas.

       Enlarges the glyph box to the specified size. (It never shrinks it.)

       Discards the in-memory glyph index <-> Unicode mapping table.

       Removes an outer area from the glyph images, shrinking the image in the process.

   fliph, flipv
       Mirrors/flips glyphs.

       Applies a "Line Graphics Enable" transformation on glyphs. It copies  the  pixels  in  the
       second  rightmost  column to the rightmost column, and does this for glyph indices 0xC0 to

       Reads a directory full of CLT files containing glyphs. CLT is a  textgraphical  format  to
       facilitate visual editing with a text console editor.

       Reads  a headerless bitmap font file, as typically used for CGA/EGA/VGA/MDA hardware, from
       the  specified  file  into  memory.  8x8x256  (width/height/glyphs),  8x12x256,  8x14x256,
       8x16x256 and 8x16x512 are supported.

       Reads a headerless bitmap font file, using the specified height N and width 8.  The number
       of characters is then autoderived from the filesize.

       Reads a Unifont .hex encoded file.

       Reads a glyphindex <-> Unicode codepoint mapping table from the given  file  into  memory.
       The  format  follows  the  maps from /usr/share/kbd/unimaps, that is, "0x00 U+0000" at its
       simplest. Multiple U+ codepoints can be specified in a line.  -loadmap does not clear  the
       mapping table, which makes it possible to cumulate mappings from multiple files.

       Reads  a  PC  Screen Font PSF 2 version 0. If the psf file comes with a mapping table, the
       current in-memory table will be discarded and replaced with the one from the PSF.

       Saves the font to a Glyph Bitmap Distribution Format file (BDF). This type of file can  be
       processed further by other tools such as bdftopcf(1) or fontforge(1) to, for example, turn
       them into Portable Compiled Format (PCF) or TrueType/OpenType (TTF/OTF)  files.  (See  the
       "Examples" section.)

       Saves  the current in-memory glyphs as multiple CLT files to the given directory. CLT is a
       textgraphical format to facilitate visual editing with a text console editor.

       Saves the current in-memory glyphs to the given file, using the headerless format.

       Saves the current in-memory Unicode mapping table to the given file.

       Saves the current in-memory glyphs as a PC Screen Font PSF2.0  file,  which  can  then  be
       loaded  into  a Linux text console with setfont(1). The in-memory Unicode mapping table is
       added to the PSF.

       Saves the font to a Spline Font Database file (SFD). This type of file  can  be  processed
       further by fontforge(1).

       Performs a linear upscale by an integral factor for all glyphs.

       Performs  a  xBRZ upscale by an integral factor. xBRZ 1.6 supports up to factor 6. (Higher
       factors will result in an empty glyph box.)

       Extracts a multi-font .cpi file (as was typically used on DOS) as separate .fnt files into
       the  specified  directory.  This  operation  does not touch the in-memory glyph buffers or
       Unicode mapping table.

       Moves all glyphs  around  within  their  canvases  by  the  specified  amount.   vfontas's
       coordinate  system has (0,0) in the upper left corner, with positive x going to the right,
       and positive y going down.

Known limits

       The Linux kernel accepts console font glyphs of at most 32x32 in size.

The Consoleet bitmap format

       The Consoleet text bitmap format is very similar to PBM itself. Instead of "P1" as in PBM,
       a  CLT  file begins with "PCLT" on the first line. In the second line, width and height of
       the bitmap in pixels is given. What follow  is  the  bitmap  data:  Each  "off"  pixel  is
       represented  by  the  2-character  string  ".."  Each  "on"  pixel  is  represented by the
       2-character "##". Each row of pixels is terminated by a newline, like in PBM.

            9 7


       Decompose a classic file into editable pictograph text files (with the help of  a  Unicode

           mkdir mu; vfontas -loadfnt /usr/share/kbd/consolefonts/mu.fnt -loadmap
           /usr/share/kbd/unimaps/cp437.uni -saveclt mu/

       To  convert  a .fnt and scale it up to make it comfortably usable with a FullHD resolution
       Linux fbconsole:

           vfontas -loadfnt mu.fnt -loadmap cp437.uni -canvas 9 16 -lge -upscale 2 2
           -savepsf mu.psf

       To convert a .fnt to TrueType/OpenType/WOFF (the Fontforge part is unfortunately manual):

           vfontas -loadfnt mux.fnt -loadmap cp437AB.uni -canvas 9 16 -lge -savesfd
           mux.sfd # && fontforge mux.sfd

       To convert a .fnt for use under X11 and XTerm (generates sizes 12, 24 and 36, @96dpi):

           for i in 1 2 3; do vfontas -loadfnt mux.fnt -loadmap cp437AB.uni -canvas 9
           16 -lge -upscale $i $i -savebdf - Mux | bdftopcf | gzip
           >~/.fonts/mux$i.pcf.gz; done; xterm -fa "misc Mux:size=24"

Comparison to earlier vfontas (2005-2018) invocation syntax

       `vfontas -D out/ -xf x.fnt` has become `vfontas -loadfnt x.fnt -saveclt out/`.

       `vfontas -D out/ -cf x.fnt` has become `vfontas -loadclt out/ -savefnt x.fnt`.

       `vfontas -Ecf x.fnt` has become `vfontas -blankfnt -savefnt x.fnt`.

       `vfontas -G <x.fnt >x.psf` has become `vfontas -loadfnt x.fnt -canvas 9 16 -lge  -savepsf2

       `vfontas  -W  <x.fnt  >x.psf`  has  become  `vfontas -loadfnt x.fnt -upscale 2 1 -savepsf2

       `vfontas --cpi -D out/ -f x.cpi/` has become `vfontas -xcpi x.cpi out/`.

See also