The Old Way - Windows XP Scaling

As mentioned, Windows XP does have support for higher density displays, but the experience is rarely very good. Changing the DPI settings in Windows XP increases the font size and OS elements, making everything larger on the screen. It works up to a point, but if the system DPI setting is too high, many applications have issues. Even in XP, there’s an API that allows a developer to check what the fonts are set at and scale their forms as needed to make it work with that ratio of font. However, if an application doesn’t check the font DPI level, there are often problems: text boxes overlap UI elements, form fields have text spill out the top or bottom of the field, and other nasty ugliness.

   

Even the OS doesn’t scale very nicely. The minimize and close buttons become very large, title bars are very text heavy in look, and system tray icons are simply scaled up in size giving an aliased and blurry look to them. It’s technically a workable solution, but without extensive developer buy-in, it likely causes as many (or more) problems than it solves.

But Windows XP is now old news, and due to the low PPI displays of the time, it was generally not an issue. DPI scaling in XP was normally used if a person felt the text on the screen was too small, but in almost all cases a better solution was to simply lower the resolution of the monitor, even if it introduced blurriness to the LCD image.

A New Way - DPI Virtualization

Windows Vista introduced a new concept for dealing with applications that are not DPI aware – DPI Virtualization. Below 120 DPI the system would continue to utilize the XP scaling algorithm, but when the DPI settings in Windows are set above 120 DPI, DPI Virtualization is enabled. Any DPI-unaware application that request the DPI setting from the operating system with DPI Virtualization enabled are simply told that the DPI is set at 96 DPI – the base level. Windows then renders the application off screen and then dynamically upscales the application to whatever DPI setting is selected by the user.

While this certainly fixes the issue with fonts falling out of text boxes, it introduces some blurriness to the application. This is not an ideal situation, since the user experience is somewhat compromised. To get around this, Microsoft developed an API to declare that the application is in fact DPI aware on its own. Developers can call SetProcessDpiAwareness to declare that their application is DPI aware, and if so, Windows will not perform any scaling of the application. It’s then up to the application developers to decide how best to handle “non-standard” DPI settings.

Scaling Windows - Introduction Where It All Falls Apart
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