Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[Solved] GUI Text and DPI Scaling in Windows - Larger Text (120 DPI)



  • Please log in to reply
3 replies to this topic
over21
  • Members
  • 33 posts
  • Last active: Jul 30 2014 01:45 PM
  • Joined: 09 Mar 2010

In Windows' Control Panel there's an option to increase the font size from 96 to 120 DPI. This makes the text in my GUIs appear larger and it no longer fits inside the required width. (I define window withs in Gui, Show, control widths for button etc.)

How can I fix this, keeping my old window and control sizes?



flyingDman
  • Spam Officer
  • 2186 posts
  • Last active: Nov 07 2015 08:15 AM
  • Joined: 27 Feb 2009

I've noticed this. I have a high definition (1920x1080) 17" notebook and I set the DPI at 125 (Windows 7) so that I can read the text.  At times that chops off text in tight text boxes and other controls.  For example take the ahk2exe GUI (see below). Most users are not aware of this, but the text to the right of the checkbox at the bottom is wrapping at 125 DPI, and because of this, the text has become virtually illegible (bottom and top are chopped off).  I do not know that there is a fix for this other than having the GUI designer adjusting for this and creating controls (the ones that have text) that are wider.  Ideally, GUI designers should check by changing their settings to a higher DPI and making sure that all controls are still OK before distribution of their application. If there is another fix, I'll like to know as well.

02_15_2013_03_51_44_clip.jpg


Marine Corps Gen. Joseph Dunford told senators at his Joint Chiefs of Staff confirmation hearing : “If you want to talk about a nation that could pose an existential threat to the United States, I'd have to point to Russia. And if you look at their behavior, it's nothing short of alarming.”


guest3456
  • Members
  • 1704 posts
  • Last active: Nov 19 2015 11:58 AM
  • Joined: 10 Mar 2011
✓  Best Answer
yes, the person who makes the GUI needs to make their controls wider to compensate

see this thread where i explain it all
http://www.autohotke...-gui-font-size/

there is a solution here:
http://www.autohotke...ge-3#entry77893

over21
  • Members
  • 33 posts
  • Last active: Jul 30 2014 01:45 PM
  • Joined: 09 Mar 2010

I see now. I'll use w%variable% in each control and Gui, Show line to adjust for different DPI settings.

 

Thanks for the solution! Cheers!