Alter existing fonts

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
User avatar
Jubilee
Engineer
Engineer
Posts: 66
Joined: 18 May 2011 08:03

Alter existing fonts

Post by Jubilee »

Hi.

What is the process for changing the fonts in OTTD (alter existing fonts perhaps) for a specific language?
-----
Chaney 'Jubilee' (Steam powered)
User avatar
jfs
Tycoon
Tycoon
Posts: 1750
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Alter existing fonts

Post by jfs »

You mean use a different typeface?

The graphics baseset contains a sprite font which is the "classic" look, but it only supports languages written in the Latin alphabet.
Otherwise you can edit the config file openttd.cfg and set a font name for the small, medium, large, and mono fonts.
User avatar
Jubilee
Engineer
Engineer
Posts: 66
Joined: 18 May 2011 08:03

Re: Alter existing fonts

Post by Jubilee »

jfs wrote:The graphics baseset contains a sprite font which is the "classic" look, but it only supports languages written in the Latin alphabet.
So, when the language is changed in game options, where does openttd find the font to use?

EDIT: Or to be more precise:
jfs wrote:The graphics baseset contains a sprite font which is the "classic" look, but it only supports languages written in the Latin alphabet.
How can i edit the sprite font contained in the baseset (i assume other sets - like z-base - have their own fonts inside?) for a specific language?
-----
Chaney 'Jubilee' (Steam powered)
Eddi
Tycoon
Tycoon
Posts: 8257
Joined: 17 Jan 2007 00:14

Re: Alter existing fonts

Post by Eddi »

if OpenTTD detects that your language uses characters not provided as a sprite in the baseset, it searches a system font (TTF) to use, or you can provide one in openttd.cfg (http://wiki.openttd.org/FAQ_troubleshooting#Windows)

A baseset can provide additional font glyph sprites for any unicode character via Action 12: https://newgrf-specs.tt-wiki.net/wiki/Action12
this should work for languages using non-latin alphabets such as japanese, but would be a lot of work for chinese characters.
it will, however, completely fail for writing systems where the shape of letters is influenced by surrounding letters, like arabic.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 8 guests