The International Simutrans Forum

Development => Extension Requests => Topic started by: scameustache on November 22, 2015, 11:29:23 AM

Title: font size with the dialog boxes + updating the documentation
Post by: scameustache on November 22, 2015, 11:29:23 AM
hello

 If the game has evolved since a number of years, the font size, it did not change. Is it that would not be possible to enlarge the font size for dialogs in the game or be able to choose size? This character size is not really suit our current screen.

thank's
Title: Re: font size with the dialog boxes + updating the documentation
Post by: An_dz on November 22, 2015, 01:37:19 PM
prissi is working on this. Since it's a new system that will replace the old it's taking its time.
Title: Re: font size with the dialog boxes + updating the documentation
Post by: Ters on November 22, 2015, 03:09:40 PM
Furthermore, it's not just a matter of font size on the super high resolution displays available these days. We might essentially have to run Simutrans in a lower resolution, and scale it up in hardware, or the computers won't be able to keep up.
Title: Re: font size with the dialog boxes + updating the documentation
Post by: scameustache on November 22, 2015, 05:45:17 PM
I think it is not necessary to go up very high resolution, although it will follow in time the resolution.

If the size and resolution are already one or two Crant (s) supperior has now, this will already good.

it would also be good to be able to complete the documentation or help with current ammélioration that come with. Also ask the community to completter translation underway.
Title: Re: font size with the dialog boxes + updating the documentation
Post by: Ters on November 22, 2015, 06:53:09 PM
I think it is not necessary to go up very high resolution

Then I'm unsure what your problem is. The current font is big enough for all HD screens I can see in the stores, compared to how it would be on older screens.

(EDIT)
I suddenly remembered that some laptops tend to cram (near) HD resolutions onto smaller screens. That might indeed be small, without reaching the amount of pixels that Simutrans can no longer cope with.
Title: Re: font size with the dialog boxes + updating the documentation
Post by: prissi on November 22, 2015, 07:41:43 PM
You can use a larger font even now, up to 14 points.
Title: Re: font size with the dialog boxes + updating the documentation
Post by: scameustache on November 22, 2015, 08:58:50 PM
Are you there any way to change my font and size in the games? I have not seen this.
Title: Re: font size with the dialog boxes + updating the documentation
Post by: prissi on November 22, 2015, 11:04:27 PM
Install a different font. So far, there have to be BDF fonts.
Title: Re: font size with the dialog boxes + updating the documentation
Post by: prissi on May 18, 2018, 06:59:23 AM
In -r8438 and higher you can select the display font and also set font sizes up to 19 pt. However, you need a matching theme that supports larger buttons (and maybe also requests wider buttons). pak192comic.large theme is best suited, but also the pak64 large them does a decent job.

With full Unicode, you font options are quite limited. Also including freetype has nearly doubled the size of the binary ...
Title: Re: font size with the dialog boxes + updating the documentation
Post by: Yona-TYT on May 18, 2018, 11:28:19 AM
Some lists need improvement.  ;)
(https://www.mediafire.com/convkey/9aa8/37l5ca6y0goow7e6g.jpg)
Title: Re: font size with the dialog boxes + updating the documentation
Post by: prissi on May 18, 2018, 12:14:17 PM
Having a posbutton much higher than the line spacing will lead to many troubles. So I declare it illegal to have a pos_button height larger than 10% of the line spacing
Title: Re: font size with the dialog boxes + updating the documentation
Post by: Ters on May 18, 2018, 04:28:11 PM
10%? I hope that is a typo.
Title: Re: font size with the dialog boxes + updating the documentation
Post by: DrSuperGood on May 19, 2018, 12:07:59 AM
The main problem with larger font size is that practically every dialog uses static anchoring and sizes for text and not layout managers. As such the text will overflow the designated line spacing resulting in illegible or ugly results.

In real UI systems a layout manager helps resize and reposition elements to be appropriate for their contents. For example if one was to enlarge the font of the text for a button the button would grow. In Simutrans this does not happen and instead the text overflows the button height.

I did change some elements to dynamically resize based on font. For example the scrollbar at the bottom of the window and loading bar will render correctly when using unifont, a font which is several pixels taller than the standard Simutrans font. However most of the UI still looks like garbage with unifont.
Title: Re: font size with the dialog boxes + updating the documentation
Post by: prissi on May 19, 2018, 12:46:41 PM
One should best define larger button and dialoge sizes in the gui_theme_t. The GUI has dynamic capabilities on almost every dialoge. But these are tighten to the button sizes. Hence, if the default button is 1.5 wider, then many of these issues should be gone.

It is the same when dynamic gui sizes were introduced, a lot of static remains were discovered.
Title: Re: font size with the dialog boxes + updating the documentation
Post by: Frank on May 19, 2018, 07:42:20 PM
In -r8438 and higher you can select the display font and also set font sizes up to 19 pt. However, you need a matching theme that supports larger buttons (and maybe also requests wider buttons). pak192comic.large theme is best suited, but also the pak64 large them does a decent job.
...

Can the optimal font/font size be specified in the theme?

example: pak64.german theme ( 0.112.3.9 ) - font size 17 - OxygenMono-Regular.ttf
(https://simutrans-germany.com/img_forum/simscr00.png)
Title: Re: font size with the dialog boxes + updating the documentation
Post by: Dwachs on May 19, 2018, 08:41:46 PM
The font selection dialog should also offer bold face fonts. Currentlz, only 'regular' fonts are used, which look very thin with larger font size.
Title: Re: font size with the dialog boxes + updating the documentation
Post by: An_dz on May 19, 2018, 10:50:55 PM
Bold fonts are just another file in the fonts folder so it's strange that it's not available.
Title: Re: font size with the dialog boxes + updating the documentation
Post by: Ters on May 20, 2018, 08:11:16 AM
But they aren't usually shown or accessed as distinct fonts on a higher level, so if Simutrans gets its fonts from a higher-level API, font style would be a separate parameter from name.
Title: Re: font size with the dialog boxes + updating the documentation
Post by: Frank on May 20, 2018, 10:02:23 AM
example: pak64.german theme ( 0.112.3.9 ) - font size 19 - DejaVuMathTeXGyre.ttf
(https://simutrans-germany.com/img_forum/simscr01.png)

Title: Re: font size with the dialog boxes + updating the documentation
Post by: prissi on May 20, 2018, 12:33:42 PM
Specifying a font in the theme file would likely lead to problems with all Japanese users, since the usual fotns are not available on Western systems and vice versa. Also the font size really depends on the display resolution.

I removed the bold (and all other variant) because my current laptop (Intel Atom) already freezes for roughly 10-20 seconds when the dialoge is opened. But mostly the List is already very long, and showing the five to seven variants per file would make it very cumbersone to select anything beyond Arial ... I would rather add a checkbox for "bold", so one can either load the regular or the bold variant.