The International Simutrans Forum

 

Author Topic: [r8765] font size from theme does not quite work  (Read 1596 times)

0 Members and 1 Guest are viewing this topic.

Offline Leartin

  • Heir-Benevolent-Dictator-Apparent
  • Devotee
  • *
  • Posts: 1469
  • PAK-DEV P192C
  • Languages: DE, EN
[r8765] font size from theme does not quite work
« on: June 06, 2019, 04:33:02 AM »
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?)

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5670
  • Languages: EN, NO
Re: [r8765] font size from theme does not quite work
« Reply #1 on: June 06, 2019, 04:52:13 AM »
Setting the font sounds very much like something that belongs in a theme.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10230
  • Languages: De,EN,JP
Re: [r8765] font size from theme does not quite work
« Reply #2 on: April 24, 2020, 01:55:25 PM »
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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5670
  • Languages: EN, NO
Re: [r8765] font size from theme does not quite work
« Reply #3 on: April 24, 2020, 04:45:55 PM »
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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10230
  • Languages: De,EN,JP
Re: [r8765] font size from theme does not quite work
« Reply #4 on: April 25, 2020, 12:42:28 PM »
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.