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: 31
Joined: 18 May 2011 08:03

Alter existing fonts

Post by Jubilee » 04 May 2019 19:35

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
Director
Director
Posts: 538
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Alter existing fonts

Post by jfs » 04 May 2019 20:56

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: 31
Joined: 18 May 2011 08:03

Re: Alter existing fonts

Post by Jubilee » 04 May 2019 21:54

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: 7410
Joined: 17 Jan 2007 00:14

Re: Alter existing fonts

Post by Eddi » 05 May 2019 02:16

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.
You might not exactly be interested in Ferion, but if you are, have fun :)

Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: vrn and 9 guests