Wintermute Engine > Technical forum

Fix to Tru-Type Font Problem

(1/2) > >>

eborr:
I know a number of people have suffered from the problem of screen text appearing larger on the screen on some computers than others.

This issue appears in windows 10 and only on laptops which have physically smaller-higher resolution screens.

Typically the graphic drivers which support these screens will display text at 125% of the font size.

To fix the problem my solution is to create a second font directory and when you are running on one of these smaller high resolution screens you set the font attribute to files in this directory.

I still have to figure a way of "discovering" the screen size - I have a couple of ideas in mind - one of which will involve external code - but it's quite a complex fix - the other is within WME - but I am not sure fi this works

Mikael:
That's good thinking. Let us know if you get it to work!

anarchist:

--- Quote ---Typically the graphic drivers which support these screens will display text at 125% of the font size. To fix the problem my solution is to create a second font directory and when you are running on one of these smaller high resolution screens you set the font attribute to files in this directory.
--- End quote ---

I am afraid this is not completely correct. The magnification of the fonts is a custom setting of Windows. Therefore, you cannot base which fonts to use on screen size or resolution. You must be able to know not only whether the user has chosen any magnification but also how much the fonts are magnified (125%, 150% etc.). Windows 10 allow up to 500% magnification (using Custom Scaling in Display Settings). For instance, I have a 27" monitor, which is why I have chosen 150% magnification.

I think the only solution is bitmap fonts because they are not enlarged by the Windows settings. We have yet to solve this issue for our game because the bitmap fonts we generated have slight imperfections.

Good luck eborr, please let us know if you find a solution.

eborr:
Thanks for the extra info - if the font size is a custom setting in windows then somewhere that information should be available.

This is my current plan -which will address the issue.

1. To create a series of alternate font directories at the moment 1 am looking at 100% and 125% - but there is no reason why I can't do more
2  Create a short "compatibility" program which will demonstrate a series of screen labels and then allow the user to select the one which works best with the environment
3 The selection will be stored as a registry entry
4. On loading the game,  -dependent on he registry value, a global path to the correct font files will be set

Not perfect - the better option would be able to access the setting automatically - but until I can do that this will work

anarchist:
Hey eborr, I would like to make a correction to your original post.


--- Quote ---This issue appears in windows 10 and only on laptops which have physically smaller-higher resolution screens.
--- End quote ---

This issue also appears in Windows 7, Vista and 8 which also support magnification. Also, it does not happen only on laptops, but generally on high resolution monitors (PC too). Usually, icons and fonts are too small and most users choose to magnify. As I mentioned above, I have a large, high resolution monitor on my PC and the issue appears here too.

The following link might be of some help:

https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/dpi-related-apis-and-registry-settings

Perhaps your game can change these settings on the fly and revert when the game closes? Of course, this might cause an issue if the user closes the game using Task Manager or presses Alt+F4.

Navigation

[0] Message Index

[#] Next page

Go to full version