Skip to content

Commit 1f6c1c6

Browse files
merni-nsLibrarian
authored andcommitted
new page: en/Manual/Fonts
User Summary: Add page describing font usage
1 parent 8663f40 commit 1f6c1c6

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

Page/en/Manual/Fonts.mediawiki

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
OpenTTD needs four different fonts: a ''medium'' font (used for most texts in the game), a ''small'' fonts (used for the smallmap legend etc), a ''large'' font (used for news headlines etc), and a ''monospace'' font (used for text files such as NewGRF readmes).
2+
3+
You can use the following types of fonts with OpenTTD:
4+
* '''OpenTTD's default fonts''', namely ''OpenTTD Sans'' (small and medium), ''OpenTTD Serif'' (large) and ''OpenTTD Mono'' (monospace). These are distributed as part of OpenTTD [https://github.com/OpenTTD/OpenTTD/pull/11593 since version 14]. The font files are included in the <code>baseset</code> directory of OpenTTD. These fonts are active by default and support the Latin, Greek and Cyrillic scripts at present.
5+
* '''Traditional sprite fonts''', which are the classic bitmap fonts included as part of the base graphics. They support only the Latin script. These fonts can be activated in the Graphics section of the [[en/Manual/Game options window]], by enabling the option "Use traditional sprite fonts".
6+
* '''System fonts''' installed on your computer. OpenTTD tries to automatically detect and activate a suitable system font in case you have selected a language not supported by the default fonts. However, if this fails, you may have to set a font manually.
7+
8+
== Setting system fonts ==
9+
There are two ways to set system fonts, using the "font" [[en/Manual/Console Commands|console command]] or editing the [[en/Archive/Manual/Settings/Openttd.cfg]].
10+
11+
=== Using the console ===
12+
Open the [[en/Manual/Console]]. On a normal English keyboard this is done by pressing the ` key (to the left of 1).
13+
14+
The command to change a font is <code>font [medium|small|large|mono] [<nowiki><font name></nowiki>] [<size>]</code>. The font name should be enclosed in double quotes if it contains spaces. Note that the size provided is multiplied by the interface scaling factor.
15+
16+
You can reset the font and size to the defaults by providing the font name <code>""</code>. This will result in the OpenTTD default font or sprite font (depending on the setting) if you are using a supported language, or a default font determined by your OS otherwise.
17+
18+
You can view the current font configuration by running the command <code>font</code> without any arguments. For more information, run <code>help font</code>.
19+
20+
=== Using openttd.cfg ===
21+
In openttd.cfg, the following settings under the <code>[misc]</code> section determine the font (this is just an example):
22+
<pre>
23+
small_font =
24+
medium_font = Arial Bold
25+
large_font = Times New Roman
26+
mono_font =
27+
small_size = 6
28+
medium_size = 10
29+
large_size = 18
30+
mono_size = 10
31+
</pre>
32+
If these settings are not present, you can add them under the [misc] section. Setting fonts via this method works the same as with the console. If any font names are left blank, the default font and size is used.

0 commit comments

Comments
 (0)