Unicode font

From ZDoom Wiki
Jump to navigation Jump to search

GZDoom supports Unicode fonts that can be defined as a series of PNG images. These fonts support a full set of Unicode characters and offer flexibility for localization.

How to use

To add a Unicode font, follow these steps:

  • Generate a series of PNG images where each image represents one glyph of the font. This can be done with a font generator, like this one.
  • Make sure the name of each image is the Unicode codepoint of the character it represents, in hexadecimal notation. For example the image with the glyph for Latin Capital Letter A must be named 0041.png; glyph with the number 1 should be named 0031.png, and so on. If you're using a font generator, it should take care of this automatically.
  • Place all of the images under the /fonts/<yourfontname>/ folder in your PK3 archive.

This way your font will be accessible everywhere with the name you gave to the folder. It's also possible to place a font.inf file in the font folder to scale it, modify its kerning and some other things, as described here.

Note: if you use a font generator, like the one by ErmacMKIII, remember that it generates fonts from the ones installed in your operating system. For the program to see a font, it has to be installed for all users. Fonts installed for a local user won't be visible.

Note 2: It's also possible create a Unicode font where one PNG image represents a series of glyphs. In this case, each image must have the name that corresponds to the Unicode codepoint of the first glyph represented (for example, an image that starts with the first Unicode character, the null character, would be named 0000.png). This is how Consolefont is presented in gzdoom.pk3.

External links