GNU Unifont

From Wikipedia, the free encyclopedia
  (Redirected from Unifont)
Jump to: navigation, search
GNU Unifont
Category Unicode, Bitmap, Sans-serif
Classification Semi-monospace
Designer(s) Roman Czyborra, Paul Hardy
Date created 1998
Date released December 22, 2016; 5 months ago (2016-12-22) (Version 9.0.06)
License GNU General Public License
See all characters

The GNU Unifont by Roman Czyborra is a free bitmap font that covers the entire Unicode Basic Multilingual Plane (BMP), using an intermediate bitmapped font format.

It is present in most free operating systems and windowing systems such as Linux, XFree86 or the X.Org Server and some embedded firmware such as RockBox. The font is released under the GNU General Public License Version 2+ with a font embedding exception (embedding the font in a document does not require the document to be placed under the same license).

It became a GNU package in October 2013.


The Unicode Basic Multilingual Plane covers 216 = 65,536 code points. Of this number, 2048 are reserved for special use as UTF-16 surrogate pairs and 6,400 are reserved for private use. This leaves 57,088 code points to which glyphs can be assigned. Some of these code points are special values that do not have an assigned glyph, but most do have assigned glyphs.

As of December 2016, the GNU Unifont has complete coverage of the Basic Multilingual Plane as defined in Unicode 9.0. the companion font, Unifont Upper, has significant coverage of the Supplementary Multilingual Plane as well as the ConScript Unicode Registry, while the Unicode ConScript Unicode Registry (CSUR) PUA Glyphs has the ConScript Registry. Scripts that are < 100% complete can be augmented by any contributor.

The large block of about 20,000 CJK ideographs has been copied from WenQuanYi's Unibit font with permission.[1]

The .hex font format[edit]

The GNU Unifont .hex format defines its glyphs as either 8 or 16 pixels in width by 16 pixels in height. Most Western script glyphs can be defined as 8 pixels wide, while other glyphs (notably the Chinese-Japanese-Korean, or CJK set) are typically defined as 16 pixels wide.

The unifont.hex file contains one line for each glyph. Each line consists of a four digit Unicode hexadecimal code point, a colon, and the bitmap string. The bit string is 32 hexadecimal digits for an 8 pixel wide glyph or 64 hexadecimal digits for a 16 pixel wide glyph.

A '1' bit in the bit string corresponds to an 'on' pixel. Pixels bits are stored top to bottom, left to right.

The font is then converted into a BDF file for use on X11.


Sample in Japanese and Chinese

This is an example font containing one glyph, for ASCII capital 'A'.


The first number is the hexadecimal Unicode code point, with range 0000 through FFFF. Hexadecimal 0041 is decimal 65, the code point for the letter 'A'. The colon separates the code point from the bitmap. In this example, the glyph is 8 pixels wide, so the bit string is 32 hexadecimal digits long.

The bit string begins with 8 zeros, so the top 4 rows will be empty (2 hexadecimal digits per 8 bit byte, with 8 bits per row for an 8 pixel-wide glyph). The bit string also ends with 4 zeros, so the bottom 2 rows will be empty. It is implicit from this that the default font descender is 2 rows below the baseline, and the capital height is 10 rows above the baseline. This is the case in the GNU Unifont with Latin glyphs.

The hexdraw Perl script produces the following output from the one line glyph definition above (at right the same output, spaced out for better visualization):

This can be edited in a text editor, then converted back into a hex string with the same utility. The goal was to create an intermediate format that would facilitate adding new glyphs.

Vectorization project[edit]

Luis Alejandro González Miranda wrote scripts to vectorize and convert the Glyph Bitmap Distribution Format unifont.bdf font to TrueType format using FontForge.[2] Paul Hardy adjusted these scripts to handle combining characters (accents, etc.) for the latest TrueType versions.[3]


Roman Czyborra created the Unifont format in 1998[4] after earlier efforts dating to 1994.

In 2008, Luis Alejandro González Miranda wrote a program to convert this font into a TrueType font. Paul Hardy modified it later to support combining characters in the TrueType version.

Finally, Richard Stallman dubbed Unifont a GNU package in October 2013, with Paul Hardy as its maintainer.


  • The Unicode Consortium: The Unicode 5.0 Standard. 5th, Addison Wesley 2007; ISBN 0-321-48091-0.

External links[edit]