News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

font size with the dialog boxes + updating the documentation

Started by scameustache, November 22, 2015, 11:29:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

scameustache

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

An_dz

prissi is working on this. Since it's a new system that will replace the old it's taking its time.

Ters

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.

scameustache

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.

Ters

Quote from: scameustache on November 22, 2015, 05:45:17 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.

prissi


scameustache

Are you there any way to change my font and size in the games? I have not seen this.

prissi

Install a different font. So far, there have to be BDF fonts.

prissi

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 ...


prissi

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

Ters


DrSuperGood

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.

prissi

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.

Frank

Quote from: 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.
...

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

Dwachs

The font selection dialog should also offer bold face fonts. Currentlz, only 'regular' fonts are used, which look very thin with larger font size.
Parsley, sage, rosemary, and maggikraut.

An_dz

Bold fonts are just another file in the fonts folder so it's strange that it's not available.

Ters

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.

Frank

example: pak64.german theme ( 0.112.3.9 ) - font size 19 - DejaVuMathTeXGyre.ttf



prissi

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.