blog: problems with DPI scaling?

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Post Reply
User avatar
nikos
Site Admin
Site Admin
Posts: 15771
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

blog: problems with DPI scaling?

Post by nikos »

here's the comment area for today's blog post found at
http://zabkat.com/blog/high-dpi-scaling-bug-fixed.htm
Kilmatead
Platinum Member
Platinum Member
Posts: 4573
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: blog: problems with DPI scaling?

Post by Kilmatead »

If you live in a glass-house, don't throw stones...

Image

And yes, that's with your precious setting engaged to disable. Image

Before you get too excited about the placebic panaceas that Windows offers as so-called "compatibilty", you may wish to read a little more about how Windows designates these things. Especially when you're not disabling scaling in the traditional sense, you're only disabling "Windows Vista DPI Virtualisation", which doesn't enter into the conflicts non-DPI aware applications have with control scaling vs. the font-size multiplier that higher DPI imposes upon the density.

One wonders what happens if one plays with the AWOL <dpiAware>true</dpiAware> setting in x2's manifest... Dr. Strangelove had a love-child with Marilyn Monroe... did you really look into this, or just jump on the first girl you met at the school dance who looked at you without that hint of disgust the other girls always had? :D Life as an innocent geek in a cul-de-sac world is a difficult one, I know.

Here's one method for the home hobbyist to get the multiplier necessary via the API for applications to configure their own sizes relative to what is actually set on the individual user's machine, rather than wearing the one-size-fits-all t-shirt...

Code: Select all

Func _GetDPI()
	Local $iDPI, $iDPIRat, $Logpixelsy = 90, $hWnd = 0
	Local $hDC = DllCall(@SystemDir & "\user32.dll", "long", "GetDC", "long", $hWnd)
	Local $aRet = DllCall(@SystemDir & "\gdi32.dll", "long", "GetDeviceCaps", "long", $hDC[0], "long", $Logpixelsy)
	$hDC = DllCall(@SystemDir & "\user32.dll", "long", "ReleaseDC", "long", $hWnd, "long", $hDC)
	$iDPI = $aRet[0]

	Select
		Case $iDPI = 0
			$iDPI = 96
			$iDPIRat = 94
		Case $iDPI < 84
			$iDPIRat = $iDPI / 105
		Case $iDPI < 121
			$iDPIRat = $iDPI / 96
		Case $iDPI < 145
			$iDPIRat = $iDPI / 95
		Case Else
			$iDPIRat = $iDPI / 94
	EndSelect

	Return Round($iDPIRat, 2)
EndFunc
That said, you do get a point for using the word "presbyopic" in the blog. :D
User avatar
nikos
Site Admin
Site Admin
Posts: 15771
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: blog: problems with DPI scaling?

Post by nikos »

the real point of this blog isn't to solve every possible text clipping caused by high DPI. Some people have freak faults like changing fonts and unworkable menu bars. These are bugs corrected by this setting. Perhaps you can cure your presbyopia by getting better glasses rather than tweaking your DPI? ;)
Kilmatead
Platinum Member
Platinum Member
Posts: 4573
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: blog: problems with DPI scaling?

Post by Kilmatead »

I'd have to actually get glasses in the first place in order to get "better" ones. I've probably needed them since I was 20, but I'm a stubborn bastard when it comes to things like this. :shrug:

You wouldn't believe the number of times I have to resort to using the built-in Windows magnifier (<WindowsKey> <NumPad +>) when faced with an obscure "captcha" when downloading... um... "stuff". (And if "some" developers would stop creating resources which use antiquated non-standard font-size 8 for their dialogs rather than the [since-Vista] MS recommended size 9, the world would be a better place.)

It's also part of being a philosophy student - if human perception is as limited and untrustworthy as it rather obviously is (the flat earth society members can reach up and touch the moon), it seems only proper for me to experiment upon myself in real life. That said, while the "do we really need opposable thumbs" experiment didn't go exactly according to plan a few years back (and wiping your bum or brushing your teeth with your left hand when you're right handed in real life is an interesting test of resolve), I'm fairly certain that a little soft-focus never hurt anybody, especially when you can always tell the difference between a big stick and a shotgun coming toward you in the menacing mist of time. :wink:

Image

(And you lose the point you gained earlier for using the word "presbyopia" twice in the same thread. :cry: We expect more synonymatic imagination from our blurry developers. For example, this whole thread is actually supposed to be about the Dhaka Polytechnic Institute of Bangladesh, so I don't really know what you're on about with funny toolbars and stuff. Have you been picking on poor Narayan again? :D)
User avatar
BearPup
Member
Member
Posts: 23
Joined: 2009 Nov 22, 12:24
Location: Northern Vermont, USA

Re: blog: problems with DPI scaling?

Post by BearPup »

As one of the people with visual impairments that need the DPI scaled to 150, this fix has made it possible for me to return to Xplorer2 as my only file manager, and to fix a couple of other applications as well (notably Mozilla's Thunderbird and Firefox).

In addition to the specific "disable display scaling on high DPI settings", I also checked run in compatibility mode | Windows 7, and run as administrator, both on the main compatibility tab. I then also checked apply for all users and repeated the settings for all users. Making sure Apply was checked, and backing out with OK & OK.

I don't know whether these settings are also required, but since they worked on my system, I elected to leave them marked. If the single disable display scaling doesn't work for you, try these additional tweaks. It works on my system this way.

Regards,
BearPup
User avatar
Thracx
Silver Member
Silver Member
Posts: 263
Joined: 2004 Nov 05, 19:33
Contact:

Recognition makes me smile

Post by Thracx »

nikos wrote:here's the comment area for today's blog post found at
http://zabkat.com/blog/high-dpi-scaling-bug-fixed.htm
Thanks for finally recognizing my perils ;-)

(Original Post)
-Thracx

"Man wants to know, and when he ceases to do so, he is no longer a man."
-Fridtjof Nansen
User avatar
BearPup
Member
Member
Posts: 23
Joined: 2009 Nov 22, 12:24
Location: Northern Vermont, USA

Re: blog: problems with DPI scaling?

Post by BearPup »

I'm writing to pass on another tip to improve the readability of Windows, both the OS and individual windows. It involves a registry hack that changes the default font from Segoe UI to Trebuchet MS Bold:

; Tutorial: http://www.sevenforums.com/tutorials/11 ... hange.html


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]
"Segoe UI (TrueType)"=""
"Segoe UI Bold (TrueType)"=""
"Segoe UI Italic (TrueType)"=""
"Segoe UI Bold Italic (TrueType)"=""
"Segoe UI Semibold (TrueType)"=""
"Segoe UI Light (TrueType)"=""
"Segoe UI Symbol (TrueType)"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
"Segoe UI"="Trebuchet MS bold"
; end reg file.

Type (copy) the above lines into a Notebook file using "reg" extension (no quotes). Once saved right click on the file and click on "Merge". That's all that's required and your screen fonts and Windows apps will use the bolder font Trebuchet MS. It made enough of a difference that I was able to drop my screen magnification from 150% down to 125%.
becritical
Member
Member
Posts: 24
Joined: 2016 Aug 12, 16:31

Re: blog: problems with DPI scaling?

Post by becritical »

hello, this doesn't work for me, it only works when I click on ADMIN under workbench, and I have AUC disabled already. Any help?
User avatar
nikos
Site Admin
Site Admin
Posts: 15771
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: blog: problems with DPI scaling?

Post by nikos »

not sure which one of the above you tried; please read the BLOG post mentioned at the beginning of the article
becritical
Member
Member
Posts: 24
Joined: 2016 Aug 12, 16:31

Re: blog: problems with DPI scaling?

Post by becritical »

Thanks I have solved the issue, I just had to restart. The problem that I have now is that the adrress bar and the search/filter bar are so tiny, the letters in the address bar are only displayed partially because the bar not high enough.
User avatar
nikos
Site Admin
Site Admin
Posts: 15771
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: blog: problems with DPI scaling?

Post by nikos »

right click somewhere on the addressbar arrow icon and choose large icons from the menu
becritical
Member
Member
Posts: 24
Joined: 2016 Aug 12, 16:31

Re: blog: problems with DPI scaling?

Post by becritical »

thanks magician!
Post Reply