High DPI in IE: Tip & Mystery Solved


On his blog (and in a comment on my 120 DPI post) Omar points out a super-secret registry tweak make IE do extra scaling in high DPI mode. IE already adjusts for well-written web pages, but if you’re using high DPI and still feeling cramped on some sites, you might want to give it a shot.


I don’t like it because it has a tendency to distort graphics, and it makes some fonts too big for my displays, but it’s good to know about. I mentioned an alternative in my own comments a few weeks ago, but I suspect not many people saw it. For the occasional web sites that hard code small font sizes, here’s a very simple “per-page zoom” workaround:


1) Create a local file (i.e. c:\web\zoom200.htm) that has the following script:



<script language=”JavaScript”>
external.menuArguments.document.body.style.zoom=”200%”;
</script>


2) Add it to the right-click menu in IE, by adding a registry key:



Key: “HKCU\SOFTWARE\Microsoft\Internet Explorer\MenuExt\Zoom 200%”
Value (Default): “c:\web\zoom200.htm”


Adjust the zoom percentage and file locations as needed and then restart IE. Now when you right click on a page the menu should have a new option to “Zoom 200%”. Clicking on that will zoom the entire page, including graphics and (most) controls. A 125% or 150% zoom is probably more reasonable for normal reading; I’ve created several zoom levels in this way. Unfortunately zoom has a few issues with font kerning/spacing, selection, controls, and an overall lack of polish, which is why you don’t see this exposed directly in the browser yet.

Comments (11)

  1. Mike Dimmick says:

    In the spirit of Bookmarklets (e.g. http://www.squarefree.com/bookmarklets/), you can also create a new shortcut with the URL set to:

    javascript:(function(){document.body.style.zoom="200%";}())

    Creating the anonymous function probably isn’t necessary, but it seems to work.

  2. Or you can just use Mozilla FireFox which has this functionality built in. A godsend for us with 150 DPI laptops.

  3. Mike Dunn says:

    I would do anything for a command/setting/whatever to have the View->Text Size menu have an effect when the web page specifies its font size in pixels. I don’t mind if the layout gets hosed, I would just like to be able to read the bloody text.

  4. Centaur says:

    Mike Dunn

    You just check that “Ignore font sizes” box in the Internet Options | Accessibility. The layout gets hosed, but you get to control the font size.

    Or, in Mozilla Firefox, you can set the minimum font size you agree with. Anything lower will be grown to your specified minimum. (Might be a good idea to steal that for IE?)

  5. Marc Wallace says:

    Mike: or just use client-side stylesheets. I have a stylesheet that basically overrides everything with !important, forcing everything times-new-roman 14pt. I started by attaching it to [font], but that doesn’t deal with inline styles… better to apply it to every element.

  6. follow these and never have to worry about dpi in IE again…

  7. Chris Hester says:

    Fascinating stuff! You guys might be interested in this post I made on this topic, along with a potentially useful demo aimed at creating a usable zoom feature for IE:

    http://www.designdetector.com/archives/04/07/IECanZoomPagesLikeOpera.php

    Wish me luck.

  8. MIke: Why not prompt for the required zoom factor?

    e.g./ Bookmarlet:

    javascript:(function(){factor = prompt("Please choose a percentage zoom factor (100% is actual size):",100);document.body.style.zoom=factor+"%";}())