Jump to content

GNU Unifont

From Wikipedia, the free encyclopedia
GNU Unifont
CategoryUnicode, Bitmap, Sans-serif
Designer(s)Roman Czyborra, Paul Hardy
Date created1998
LicenseSource code: GPL-2.0-or-later
Font: GPL-2.0-or-later with Font-exception-2.0, SIL OFL 1.1 (since 13.0.04)
Manual: GFDL-1.3-or-later
Shown here13.0.06
See all characters
Latest release version15.1.05[1] Edit this on Wikidata
Latest release date24 February 2024

GNU Unifont is a free Unicode bitmap font created by Roman Czyborra. The main Unifont covers all of the Basic Multilingual Plane (BMP). The "upper" companion covers significant parts of the Supplementary Multilingual Plane (SMP). The "Unifont JP" companion contains Japanese kanji present in the JIS X 0213 character set.

It is present in most free operating systems and windowing systems such as Linux, XFree86 or the X.Org Server, some embedded firmware such as RockBox, as well as in Minecraft Java Edition.[2] The source code is released under the GPL-2.0-or-later license. The font is released under the GPL-2.0-or-later license with Font-exception-2.0 (embedding the font in a document does not require the document to be placed under the same license); and from version 13.0.04, dual-licensed under SIL Open Font License 1.1. The manual is released under the GFDL-1.3-or-later license.

It became a GNU package in October 2013. The current maintainer is Paul Hardy.


The Unicode Basic Multilingual Plane covers 216 (65,536) code points. Of this number, 2,048 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 May 2019, the GNU Unifont has complete coverage of the Basic Multilingual Plane as defined in Unicode 12.1.0. Its companion fonts, Unifont Upper and Unifont CSUR, have significant coverage of the Supplementary Multilingual Plane and the ConScript Unicode Registry, respectively.

For version 12.1.02, Unifont JP was released, which covers 10,000 Japanese kanji present in the JIS X 0213 character set, some of which are in the Supplementary Ideographic Plane. It is derived from Jiskan16, a public domain font.

Incomplete scripts can be added to by any contributor.

Most of the CJK ideographs on the font has been copied from WenQuanYi's Unibit font with permission.[3]: Wen Quan Yi: Spring of Letters 

Unifont stores only one glyph per printable Unicode code point. Because of this, it does not feature the OpenType features needed to render scripts with complex layouts correctly, and it does not correctly position the combining diacritics with base letters if these combinations are not encoded in Unicode in their pre-combined form; the contextual forms (including joining types, and subjoined clusters) are not handled as well. This increases the number of glyphs to include in the basic font and it is not currently possible (because of current OpenType limitations) to encode all the needed glyphs to represent all the required combinations that can exist in a single Unicode plane (this is also true for Chinese fonts that cannot cover completely all ideograms currently encoded in two planes, and also in a third plane). Unifont is then intended to only be used as a "last resort" default font, suitable for simple alphabetic scripts, or to render isolated characters, but will make actual texts difficult or sometimes impossible to read correctly. For correctly rendering Indic abugidas (and semitic abjads if they are written with their optional combining diacritics), other fonts should be specified before this one, and additional fonts will be needed to cover Han ideographs encoded in supplementary planes, or to render most historic (or minority modern) scripts not encoded in the BMP.


Sample in Japanese and Chinese

Unifont, as of version 15.0.6, is available in TTF (and OTF), BDF, PCF, .hex, and PSF formats for the "standard build". Only the TrueType build is split into two fonts.[3]

A few "specialized versions" have been built by request and made available by Paul Hardy. These include a bitmap TTF (SBIT) with empty glyphs filled with code-point values for FontForge users to read, a PSF bitmap with glyphs for APL programmers, and single-file versions in Roman's .hex format (see below).[3] The actual organization of the source consists of smaller .hex files to be stitched together and converted to other formats in a build.[4]


Luis Alejandro González Miranda wrote scripts to vectorize and convert the BDF font to TrueType format using FontForge.[5] Paul Hardy adjusted these scripts to handle combining characters (accents, etc.) for the latest TrueType versions.[3]: TrueType Font Generation 

.hex 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. The goal is to create an intermediate format that would facilitate adding new glyphs.

The bit string is converted from hexadecimal to binary. A 1 bit in the binary bit string corresponds to an 'on' pixel. The pixel's bits are stored line by line, from the top to the bottom, in big-endian order.


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.

Over time, a number of ways have been created to handle the format. The earliest way is the hexdraw Perl script, which converts the string into an ASCII art representation to be edited in a text editor. Another method involves generating a bitmap image grid for an entire range of code points and working with an image editor. In either case, the edited glyphs are later converted back into .hex files for storage.[4]


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

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

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

See also[edit]


  1. ^ Paul Hardy (25 February 2024). "Unifont 15.1.05 Released". Retrieved 8 March 2024.
  2. ^ "Minecraft 1.20 Pre-Release 6". Minecraft Official Site. 25 May 2023. Retrieved 25 June 2023.
  3. ^ a b c d GNU Unifont Glyphs, archived from the original on 2013-11-12, retrieved 2008-07-16
  4. ^ a b "Unifoundry Unicode Utilities". unifoundry.com. Archived from the original on 4 April 2019. Retrieved 16 April 2019.
  5. ^ GNU Unifont in TrueType format, archived from the original on 2016-02-01
  6. ^ "Roman Czyborra's GNU Unifont page". Archived from the original on 2011-08-27. Retrieved 2009-06-03.
  • The Unicode Consortium: The Unicode 5.0 Standard. 5th, Addison Wesley 2007; ISBN 0-321-48091-0.

External links[edit]