View Issue Details

IDProjectCategoryView StatusLast Update
0006283The Dark ModCodingpublic15.10.2023 15:02
Reporterstgatilov Assigned Tostgatilov  
Status resolvedResolutionfixed 
Product VersionTDM 2.11 
Target VersionTDM 2.12Fixed in VersionTDM 2.12 
Summary0006283: Support aspect ratio corrections for fonts
DescriptionThe whole GUI system is rendered in virtual 640:480 resolution, which is later scaled onto the screen that player has.
Since today nobody uses 4:3 displays and everyone uses something around 16:9 (don't even think about poor guys with 21:9), everything get stretched +33% by X.
This also applies to fonts: they are rendered with intended proportions in virtual 4:3 screen, but player sees them distorted.

The idea is to take an existing font and reduce all of its X lengths so that it looks properly on player screen.
Since having different text layouts depending on player's aspect ratio is quite undesirable, we'd better ask for explicit aspect ratio correction.
So e.g. we can support fonts like "fonts/carleton@aspect=16:9" that would multiply all X lengths by 75% so that it looks perfectly on 16:9 screen.
Of course if player has 16:10 screen, it would be slightly stretched, but that's a minor sacrifice to do in order to get same layout for everyone.
Additional InformationThis is originally an improvement to make subtitles more readable:

Unlike most of other text, player does not have too much time on reading subtitles, so they should be easy to read and not obstruct too much screen space.
TagsNo tags attached.




02.04.2023 08:08

administrator   ~0015986

r10346 Allow using aspect-corrected fonts like "fonts/carleton@aspect=16:9"
r10347 Convert all font sizes from int to float.

It seems to work fine for carleton.
For stone font, I see that letters slightly overflow into each other (random thin white lines), but this issue happens without aspect correction too.


14.10.2023 18:13

reporter   ~0016127

About the Stone font problem, I speculate that this is due to a missing file tdm_fonts01\fonts\english\stone\fontimage_12.dat

If someone has access to very-early TDM distributions, it is possible that file could be found and restored from there.



14.10.2023 18:29

reporter   ~0016128

Also, I noticed a "carleton_compressed" font and attempted to try that, to see how it compared with "carleton@aspect=16:9". But gave a run time error about not being able to register font due to missing fontimage_48.dat file. The resulting text display didn't look like carleton at all, so probably some default font substituting.


15.10.2023 15:02

reporter   ~0016129

Ignore that last post, should have been "carleton_condensed". Will correct the gui and try it again when I have the chance.

Issue History

Date Modified Username Field Change
01.04.2023 20:27 stgatilov New Issue
01.04.2023 20:27 stgatilov Status new => assigned
01.04.2023 20:27 stgatilov Assigned To => stgatilov
02.04.2023 08:08 stgatilov Note Added: 0015986
02.04.2023 08:08 stgatilov Status assigned => resolved
02.04.2023 08:08 stgatilov Resolution open => fixed
02.04.2023 08:08 stgatilov Fixed in Version => TDM 2.12
14.10.2023 18:13 Geep Note Added: 0016127
14.10.2023 18:29 Geep Note Added: 0016128
15.10.2023 15:02 Geep Note Added: 0016129