Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: Fix to Tru-Type Font Problem  (Read 12102 times)

0 Members and 1 Guest are viewing this topic.

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Fix to Tru-Type Font Problem
« on: December 19, 2017, 09:35:07 PM »

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
Logged

Mikael

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 127
    • View Profile
    • MDNA Games
Re: Fix to Tru-Type Font Problem
« Reply #1 on: December 22, 2017, 04:05:49 AM »

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

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Re: Fix to Tru-Type Font Problem
« Reply #2 on: December 22, 2017, 02:20:59 PM »

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.

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

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: Fix to Tru-Type Font Problem
« Reply #3 on: December 31, 2017, 01:40:46 PM »

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

Logged

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Re: Fix to Tru-Type Font Problem
« Reply #4 on: January 02, 2018, 05:18:20 PM »

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.

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

HCDaniel

  • Regular poster
  • ***
  • Karma: 8
  • Offline Offline
  • Posts: 168
    • View Profile
Re: Fix to Tru-Type Font Problem
« Reply #5 on: January 03, 2018, 07:08:15 AM »

Is it an option to consider moving to WMElite? It renders fonts with an external library (libfreetype) which does not depend on any Windows settings, so whatever font size you pick will always be used.
Logged

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: Fix to Tru-Type Font Problem
« Reply #6 on: January 03, 2018, 01:10:48 PM »

@anarchist, thanks for the info, that would seem to be exactly the data I am looking for.

@hcdaniel, good suggestion, however we are a far way in with our application, and although we don't use any explicitly 3d calls I am nervous about moving to lite, having no experience with it, and being a fair way in with application development. I am also unsure about the implications with using some of the libraries in lite, both from a technical, and/commercial point of view
Logged
 

Page created in 0.043 seconds with 20 queries.