Partager via


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

  • Anonymous
    May 04, 2004
    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.
  • Anonymous
    May 04, 2004
    Or you can just use Mozilla FireFox which has this functionality built in. A godsend for us with 150 DPI laptops.
  • Anonymous
    May 05, 2004
    The comment has been removed
  • Anonymous
    May 23, 2004
    The comment has been removed
  • Anonymous
    May 24, 2004
    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.
  • Anonymous
    May 24, 2004
    It's just script.
  • Anonymous
    July 10, 2004
    follow these and never have to worry about dpi in IE again...
  • Anonymous
    July 25, 2004
    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.
  • Anonymous
    July 29, 2004
    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+"%";}())
  • Anonymous
    May 29, 2009
    The comment has been removed