1UNIFONT(5)                    File Formats Manual                   UNIFONT(5)
2
3
4

NAME

6       Unifont - A bitmapped font with full Unicode Plane 0 (BMP) coverage
7

SYNOPSIS

9       unifont.hex
10

DESCRIPTION

12       Unifont is a bitmapped font with glyphs described in a plain text file,
13       generically referred to as unifont.hex herein.  This man page describes
14       the  format of three related files: unifont.hex, masks.hex, and combin‐
15       ing.txt.  All three of these files start with a Unicode code point as a
16       hexadecimal string, with code points appearing in ascending order.
17
18       A  unifont.hex  file  consists  of single-line entries for each Unicode
19       code point.  Each line contains the code point,  a  colon  (':')  field
20       separator,  and  the  glyph bitmap.  The glyphs in a unifont.hex format
21       file must appear in ascending Unicode code point order.
22
23       This file can be converted into a BDF font using the hex2bdf  (1)  pro‐
24       gram,  and  into a TrueType font using fontforge (1) (which is not part
25       of this package).  The BDF font can also be converted into a  PCF  font
26       using bdftopcf (1) (which is also not part of this package).
27
28       The first field
29              The  first field is the Unicode code point in hexadecimal, rang‐
30              ing from "0000" through "FFFF", inclusive.  This corresponds  to
31              the Unicode code points U+0000 through U+FFFF, respectively.
32
33       The second field
34              The second field is the glyph's bitmap string.  This is a series
35              of hexadecimal digits.   Currently  Unifont  encodes  two  glyph
36              sizes:  8  pixels  wide by 16 pixels tall (single-width), and 16
37              pixels wide by 16 pixels tall (double-width).
38
39              As each hexadecimal digit can encode four bits, one pixel row of
40              a  glyph is either two hexadecimal digits long (single-width) or
41              four hexadecimal digits long (double-width).  The glyphs are  16
42              pixels tall, so a single-width glyph is (2)(16) = 32 hexadecimal
43              digits long and a double-width glyph is (4)(16) = 64 hexadecimal
44              digits long.
45
46       Previous  versions  of  this  package  supplied a file named masks.hex.
47       This file followed the same format as unifont.hex with  a  first  field
48       that was a Unicode code point in hexadecimal, followed by a colon (':')
49       field separator, followed by a second  field  that  was  a  hexadecimal
50       string  representing  a  glyph  bitmap.   Code points were in ascending
51       order.  The glyph bitmaps were bitmaps  that  would  be  exclusive-ored
52       with the glyph in unifont.hex that had the same code point.  The origi‐
53       nal unifont.hex contained combining circles as depicted in The  Unicode
54       Standard.  When Paul Hardy got combining characters to display properly
55       in the TrueType version, it became desirable to remove these  combining
56       circles for proper display with unifont.ttf.  The program uniunmask (1)
57       will read such a masks.hex file, read a unifont.hex  format  file,  and
58       apply  the  exclusive-or masks in masks.hex to unifont.hex.  The output
59       is another file in unifont.hex format with the masked-off  bits  (i.e.,
60       combining circles) removed.
61
62       Because  the operation is an exclusive-or, masks.hex could also be used
63       to turn on pixels in selective glyphs, for  example  to  add  combining
64       circles  to  selective glyphs that do not show them.  However, the pro‐
65       gram unigencircles (1) can do this without a separate  masks.hex  file.
66       Thus  masks.hex is no longer supplied with this package.  uniunmask (1)
67       remains part of this distribution in case someone might find creating a
68       custom masks.hex file useful for another purpose.
69
70       The  TrueType  version  of the font, unifont.ttf, and the unigencircles
71       (1) utility both read a file combining.txt.  This file appears  in  the
72       directory font/ttfsrc.  The combining.txt file is a list of code points
73       as hexadecimal strings, one per line in  ascending  order,  of  Unicode
74       code  points  that show combining circles in The Unicode Standard.  Any
75       glyph with its code point listed in combining.txt will have zero  width
76       in unifont.ttf.
77

UTILITIES

79       Roman  Czyborra,  the font's creator, originally wrote two Perl scripts
80       as utilities: bdfimplode (1) and hexdraw (1).
81
82       The bdfimplode (1) Perl script reads in a font in BDF format and gener‐
83       ates a font output in unifont.hex format.
84
85       The hexdraw (1) Perl script might appear somewhat magical.  It can read
86       a file in unifont.hex format and generate a text file with  each  glyph
87       appearing as a grid of characters in an 8 by 16 or 16 by 16 grid: a '-'
88       character indicates a corresponding white pixel, and  a  '#'  character
89       indicates a corresponding black pixel.  These pixel grids are indented.
90       The first line shows the code point for a glyph, followed  by  a  colon
91       (':').   This text file can then be modified with any text editor.  The
92       magical part about hexdraw (1) is that it will read in this text  file,
93       detect  that  it  is  in this converted format, and produce as output a
94       second file in Unifont's .hex format.  Thus hexdraw  (1)  automagically
95       provides  round-trip  coverage  between  an  original font file in uni‐
96       font.hex format and an intermediate text graphics format for editing.
97
98       Utilities introduced after those first  two  convert  a  file  in  uni‐
99       font.hex  format  to  and  from bitmapped graphics (".bmp") files.  The
100       unihex2bmp (1) program converts a file in  unifont.hex  format  into  a
101       .bmp  format  file, for editing with a graphics editor.  The unibmp2hex
102       (1) program performs the reverse conversion, from a bitmapped  graphics
103       format back to a file in unifont.hex format.
104
105       hexdraw  (1),  unihex2bmp  (1), and unibmp2hex (1) are the central pro‐
106       grams that handle conversion of a unifont.hex file  to  and  from  two-
107       dimensional glyph representations for visual editing.  See the TUTORIAL
108       file included in the source pakcage for more information on  these  and
109       other  utilities  to  customize unifont.hex format files.  Also consult
110       the man pages for the utilities listed below.
111

FILES

113       The following files are part of the Unifont source distribution:
114
115       font/plane00/*.hex
116                      GNU Unifont font files
117
118       LICENSE        The Unifont license
119
120       README         Instructions on building Unifont
121
122       TUTORIAL       Tutorial on customizing Unifont
123

SEE ALSO

125       bdfimplode(1),  hex2bdf(1),  hex2sfd(1),   hexbraille(1),   hexdraw(1),
126       hexkinya(1),  hexmerge(1), johab2ucs2(1), unibdf2hex(1), unibmp2hex(1),
127       unicoverage(1),  unidup(1),  unifont-viewer(1),  unifont1per(1),   uni‐
128       fontchojung(1), unifontksx(1), unifontpic(1), unigencircles(1), unigen‐
129       width(1), unihex2bmp(1),  unihex2png(1),  unihexfill(1),  unihexgen(1),
130       unipagecount(1), unipng2hex(1)
131

AUTHOR

133       The  unifont.hex  format  was  created  by Roman Czyborra, who drew the
134       original set of glyphs.
135

LICENSE

137       unifont is Copyright © 1998 Roman Czyborra, with portions  Copyright  ©
138       2007–2013 Paul Hardy, Copyright © 2004–2013 Qianqian Fang, and others.
139
140       This program is free software; you can redistribute it and/or modify it
141       under the terms of the GNU General Public License as published  by  the
142       Free  Software Foundation; either version 2 of the License, or (at your
143       option) any later version.
144

BUGS

146       The format is very straihtforward and no  real  bugs  exist.   However,
147       Unifont's original BDF font format does not support Unicode's combining
148       characters (accents, etc.); only the TrueType version of Unifont does.
149
150
151
152                                  2013 Sep 27                       UNIFONT(5)
Impressum