Windows 8.1 - More DPI Changes

When Microsoft launched Windows 8.1, it continued to refine the scaling functionality. To assist with people using a tablet such as the Microsoft Surface as a desktop replacement, Windows 8.1 now has the ability to have independent DPI settings per display. This was sorely needed, as anyone who used a Surface Pro (a 1920x1080 pixel 10.6” display) and then connected it to an external 1080p monitor that was two to three times the size of the tablet display complained bitterly about what a terrible experience this was. The Surface Pro’s on-device screen is set at 150% scaling which is necessary to make that resolution work on a 10” screen, but on a 24” monitor all on-screen elements are enormous.

Having two independent DPI settings is not without its challenges. Applications are initially scaled at the DPI setting of whichever monitor they are opened on. With any multi-monitor system, the operating system has to be able to deal with a person moving an application from one monitor to the other. If the application is scaled at the initial DPI, how to you keep it from becoming too large or too small when moved? The solution is once again DPI Virtualization, and once again it’s a solution that works but it’s not ideal.

If the initial monitor is a lower DPI, the application will be scaled up when moved to the higher DPI display, and if it moves from a High DPI monitor to a low DPI display, it will be scaled down. Just like with the Windows Vista DPI Virtualization, this method can result in applications that aren’t as sharp as they should be, as well as quirks with user elements. To get around these issues, Microsoft has expanded the DPI API to allow for per-monitor DPI-aware applications.

Applications that are per-monitor DPI-aware are expected to automatically re-scale themselves when moved between displays. They can do this because the operating system will send a WM_DPICHANGED message to the application when most of the application’s area has moved to a display with a different DPI level. The message sent to the application includes a recommended DPI level, but the application can choose whatever value it wants.

Windows 8.1 also improves several other key elements of DPI settings, continuing the tweaks made since the days of Windows XP where you had to reboot for a DPI change.

High DPI Windows Features
Feature Windows XP Windows Vista Windows 7 Windows 8 Windows 8.1
DPI Virtualization of DPI-unaware apps No Yes Yes Yes Yes
DPI Virtualization of System DPI-aware apps No No No No Yes
API to declare DPI awareness level No Yes Yes Yes Yes
API to declare per-monitor DPI awareness No No No No Yes
APIs to retrieve system metrics and DPI Yes Yes Yes Yes Yes
Window notification of DPI change No No No No Yes
APIs to retrieve monitor DPI No No No No Yes
Requires reboot for monitor DPI change N/A N/A N/A N/A No
Requires a reboot/log off for system DPI change Reboot Reboot Log off Log off Log off
Per user DPI setting No No Yes Yes Yes
Auto configuration of DPI at first logon No No Yes Yes Yes
Viewing distance incorporated in default DPI calculation No No No No Yes

All of this DPI talk has focused 100% on the desktop environment. That is because the Modern environment for Windows has the luxury of being built with no legacy applications to deal with, so it can actually work in a manner similar to Apps on iOS and Android.

Windows 8.1 - Windows Store Apps

Love it or hate it, the Modern environment for Windows came at a time when High DPI devices already existed. This allowed it to be architected with support for native scaling for all applications. Windows Store apps are automatically scaled by Windows based on physical screen size, resolution, and device form factor at a ratio of 100%, 140%, and 180%. Windows Store apps encourage the use of scalable vector graphics if possible, or multiple copies of bitmap images to allow crisp images regardless of the scaling used.

Windows Store apps, and even Windows itself, scales not only the DPI of the application, but also how much content the application can display based on the physical screen size. Larger displays, much like in the desktop world, are often used to see and do more on the screen rather than just make everything larger as on a phone, and the Windows Runtime allows for all of this.

Windows Store apps require far less work from the developer in order to achieve this scaling. The app doesn’t have to be DPI aware, because by default all applications automatically are. Instead, things such as XAML layouts and SVG graphics allow the apps to be rescaled completely by the operating system.

Here is Adobe Touch, a Windows Store app version of Adobe Reader. It’s perfectly at home even at 3200x1800 on a 13.3” display. All of the UI elements are correctly sized and of course still usable by touch.

When It All Goes Really Wrong Final Words
Comments Locked

114 Comments

View All Comments

  • weebnuts - Wednesday, April 16, 2014 - link

    Thanks for the Google Chrome tip, it used to scale fine until a month or so ago, they must have changed things in the new versions when the new windows 8.1 update was released.
  • Icehawk - Wednesday, April 16, 2014 - link

    I just ran into this issue this week when I added a Dell 27" to my family of older 19x12 16:10 monitors - aside from the aspect ratio change in order to use the new Dell as my main monitor I need scaling or the text is too small - now my old monitors are cartoonishly large. Was hoping to skip W8 but will try W8.1U1 and see if it works better with the different DPI levels and doesn't drive me insane with Metro, ahem, I mean Modern.
  • kgh00007 - Wednesday, April 16, 2014 - link

    Cheers for the tip on Chrome, it looks way better now on Win 8.1 on my 40" 1080p TV!
  • fokka - Wednesday, April 16, 2014 - link

    i'm really thankful for the article shedding more light at this topic, maybe this will bring more developers to update their programs to feature better hidpi-skaling.
  • vlad0 - Thursday, April 17, 2014 - link

    Great talk on DPI @ build2014

    http://channel9.msdn.com/Events/Build/2014/2-535
  • liffie420 - Thursday, April 17, 2014 - link

    This is not really a comment on the article itself but something that the screen shots bring up dealing with web pages. This does not apply to all pages however, but with most people using a widescreen display (we are talking at least %95 at this point) regardless of actual resolution why is it that we page developers can not manage to scale the page elements to wide screen?? Having done a very small amount of hand coding html back in the day (16ish years ago) I know you want to aim for the LCD to be sure your pages load correctly on all browsers and across connection types. But why is it you can't fill the sides os your browser window with the actual site. Im in the newest chrome browser with a 22" lcd at 1080P yet the site itself only falls in the middle leaving a couple inches of screen empty. Yes you can F11 in most browsers and full screen but that still rarely fixes the issue. Just a pet peeve of mine is all.
  • dorekk - Saturday, June 21, 2014 - link

    Because very wide lines of text are extremely awkward to read, so it's much better to make the text area of a website look roughly like a portrait-oriented piece of paper.
  • Androidtech - Thursday, April 17, 2014 - link

    I find it rather perplexing that a mobile operating system like Android is more capable at scaling resolutions than something as old as windows. I thought things are supposed to get better with age and experience. Oh well at least this summer we will have some new code for websites to scale properly !
  • caywen - Friday, April 18, 2014 - link

    In actuality, IE11 on Windows 8.1 isn't clear of these problems when doing multi-monitor. I have a Yoga 2 Pro connected to a 24" 1080p display. IE11 looks beautiful on the Y2P display, but when moved to the 24" display, the whole UI becomes enormous. The title bars are almost 1" thick! Clearly, Microsoft still have a few hurdles.

    Other windows, when dragged between displays, instantly snap to their "normal" size on that display, but the effect is strange.

    I think what they ought to do is:
    - Support high-DPI virtualization where applications can advertise that they support, say, 200 or 300dpi. The author can then write their app specifically to that. Windows could then do the same DPI virtualization, but the scaling would then be much sharper (and almost always downwards).
    - Draw *only* from the virtual buffer to each display. That way, there would be no snapping effect - just the app always being the right size even when between displays.
    - Create a virtual buffer at the highest DPI of all the connected monitors and have 96dpi apps draw scaled-up into that buffer. The difference would be that text draw calls would draw at the native size rather than at 96dpi. At least the text in these apps would be razor sharp, if not the icons and other things.
  • AnnonymousCoward - Saturday, April 19, 2014 - link

    The name "retina display" doesn't even make sense, because a retina senses light. Apple just went with "[some word associated with vision] display".

Log in

Don't have an account? Sign up now