3

I have a Windows 8.1 laptop (Dell XPS) with a high-DPI screen (15" 3840x2160), and two external monitors which are normal DPI (19" 1920x1200). (No font changes from defaults.)

Windows 8 seems to know about the varying DPI, and most things work very well. If I move a window from the high-DPI screen to a low-DPI screen, then the window will spontaneously change size so the text is readable on the current display.

Programs which work fine:

  • "gitk", launched from a Cygwin terminal using X-Win.
  • notepad
  • Almost everything else

A few programs cause trouble. They have tiny, unreadable text, on both the high-DPI screen and the low-DPI monitors. Examples include:

  • JMeter, launched from maven (a Java Swing application)
  • "git-gui", launched from a Cygwin terminal using X-Win.
  • The windows shell, "Command Prompt"

(Sometimes the problem comes and goes depending on whether the laptop booted up while connected to the low-DPI monitors or if I booted without them and then subsequently plugged them in (related to How do I make Windows scale the taskbar correctly after I switch to monitors with different DPIs? ).)

  • Is there any way I can scale up the window for a specified application, when that app is not Windows DPI aware? The Windows magnifier is quite clunky for this.
  • Is there any way I can override the declared DPI for a specified application without affecting other apps?

Here is a screenshot showing Command Prompt, Notepad, Git Gui and Gitk on the same screen:

screenshot showing Command Prompt, Notepad, Git Gui and Gitk on the same screen

Rich
  • 274
  • 1
  • 7
  • 23
  • got any download links I can experiment with? – Roke Nov 06 '15 at 02:37
  • you can install cygwin from https://www.cygwin.com/ but i don't think it's anything specific to that app. other windows sometimes do the same – Rich Nov 06 '15 at 11:57
  • I'm assuming this isn't the answer: https://blogs.windows.com/windowsexperience/2013/07/15/windows-8-1-dpi-scaling-enhancements/ – ZN13 Nov 06 '15 at 12:06
  • @ZN13 - I'm using Win 8.1, yes. What are you suggesting I do to fix my problem? That link is interesting but doesn't offer a solution AFAICT. – Rich Nov 06 '15 at 14:38
  • Maybe something like "DPIMangler" from here http://superuser.com/a/752617/100185? – Rich Nov 12 '15 at 17:13
  • It wouldn't hurt to provide some details: laptop model and screen resolution; external monitor models, resolutions, and connection methods; is the screenshot from the laptop and is the command window the tiny font example? Is the system using its original default screen fonts or have you modified anything font-related? Was 8.1 the original OS? Has the problem always existed or is this a recent development? – fixer1234 Nov 16 '15 at 06:21
  • @fixer1234 added, although I don't think it really changes things. I think this is not fixable :-( – Rich Nov 17 '15 at 07:30
  • 1
    My work around is to disable dynamic dpi scaling completely, which works but isn't an optimum solution. (So, change the monitor to 1600 x 900, then on the "Make text and other items larger or smaller" page, I choose "Let me choose one scaling level for all my displays", and then set it to Smaller - 100%. Obviously you lose the douple dpi display on the laptop, but to be honest, my eyes can barely tell the difference, and it makes my computer so much more usable) – David E Jan 21 '16 at 16:26

2 Answers2

2

Applications must handle the WM_DPICHANGED message and they have to support PROCESS_PER_MONITOR_DPI_AWARE in the application manifest (<dpiAware>true/PM</dpiAware>).

When no app supports it you only have to request an app update from the developers. We can't fix this for you here.

magicandre1981
  • 97,301
  • 30
  • 179
  • 245
  • Thanks. I have about 0% chance of getting an update for the windows command prompt or `gitk` on Cygwin. I think that the manifest hacks from http://superuser.com/a/752617/100185 look most like a fix here. – Rich Nov 18 '15 at 11:56
  • I doubt that the this will works correctly, but give it a try. – magicandre1981 Nov 18 '15 at 18:07
  • also try Windows 10. Here you can select the DPI on each monitor. Maybe cmd.exe was also updated to handle this message. – magicandre1981 Nov 22 '15 at 07:39
-1

Did you try and edit the font setting in the top three lines of ~/.gitk? To change the fonts and/or sizes.

  • set mainfont {Helvetica 12}

  • set textfont {Courier 12}

  • set uifont {Helvetica 12 bold}

If you editing the .gitk in cygwin doesn't work try and remove the gitk config file.

$ rm ~/.gitk

And run again.

blackjack929
  • 304
  • 2
  • 4
  • 1
    The problem is not specific to `gitk` (in fact, `gitk` doesn't actually suffer from it for me, only `git gui`). I'm not looking for a change to a particular app, but a way to fix non-DPI aware apps from Windows. I have clarified the question. – Rich Nov 09 '15 at 12:21
  • GitGui cannot function without gitk. So on that note. Did you try the suggested resolution? Gitk and gitgui are not separate but integrated with gitgui taking direction from gitk and the .gitk config. – blackjack929 Nov 16 '15 at 06:59
  • I've tried it, and strangely it doesn't seem to affect the font in either gitk or git-gui. In any case I was hoping for a non-app-specific fix, as this affects a few apps. More like http://superuser.com/questions/127214 – Rich Nov 16 '15 at 09:40
  • I understand. But with a Frankenstein such as the Windows OS, there are very few opportunities for a non-specific fix when dealing with an application such as git that doesn't have an ms .exe installer. There are layers upon layers of languages trying to work together, varied versions of .net, VB, C, whole sections of forgotten code dealing with compatibility. Good luck. Cheers. – blackjack929 Nov 16 '15 at 20:41