Unicode

From OpenTTD

Jump to: navigation, search
A screenshot showing Arial in use as the font in OpenTTD
A screenshot showing Arial in use as the font in OpenTTD

In OpenTTD 0.5.0, Unicode has been introduced. This allows for support for languages which use non-ASCII characters, like Chinese or Russian, but it is also needed to propely display any language that contains non ASCII,

It is also possible to use different fonts in OpenTTD using this feature using three strings in your openttd.cfg under misc:

small_font =
medium_font =
large_font =

Small fonts are used beneath vehicles in the vehicle lists, as the date on newspapers, and other places. Medium fonts is the majority of GUI text, town and station names, and window headers. Large Fonts are used as newspaper headings and on the endgame Score list.

Fill these out with fonts installed on your system and they will be displayed in the game.

small_size =
medium_size =
large_size =

There is also possibility to set font sizes (in px) for given font types. Be aware that most fonts make a poor small font, while other fonts may not make good medium or large sizes.

Because of poor small fonts, one should select bitmap font, because that is by its very nature done to be displayed small. Users of GNU/Linux systems may choose from variety range of bitmap fonts allready installed with X server, such as 5x7.pcf.gz. These fonts are small and well rendered in terms of openttd. In Debian GNU/Linux and alike distributions, it is located in /usr/share/fonts/X11/misc/.

These fonts are located in debian package xfonts-base, and after unpacking .deb by apropriate packaging software, you can acces these fonts. However, it is not sure if these fonts are possible to work on Windows boxes.

Since r10166 it is possible to use anti-aliased fonts using the 32bpp blitter. Anti-aliasing is configurable per font with the following settings:

small_aa =
medium_aa =
large_aa =
Personal tools