News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

[r8765] font size from theme does not quite work

Started by Leartin, June 06, 2019, 04:33:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Leartin

You can define a font size in the theme, and Simutrans takes the value, but does not change the displayed font size. There probably needs to be a call to the font routine in the theme selection such that it actually works.
(In order to test, you first have to pick a different font, since the standard bitmap font never changes size in the first place. perhaps, since the font size can be set in the theme, the font could be set as well, similar to websites as a list of potential fonts where the first installed on the system is used?)

Ters

Setting the font sounds very much like something that belongs in a theme.

prissi

Since there is a low chance of hitting a font on all Linuxes, MaxOS and Windows with the same name and path, naming a font will most likely not work.

Ters

Themes either need to be able to list fonts in order of preference like CSS, or the font files themselves need to be part of the theme.

prissi

In principle Freetype2 should be able to load a font from a theme. But not all architectures currently build with freetype. But font size really depends on your eye size and monitor size. Hence the current solution that the last font and size is remembered for the player.

Dwachs

I find it rather annoying when a theme sets the font size. I also use the largest possible (19). I would rather disable selecting font size for themes.
Parsley, sage, rosemary, and maggikraut.

Ters

Themes could be allowed to set relative font sizes, based on either a user selection or something calculated from the display's DPI. Hardcoding the actual size in pixels or something like that, is bad.