Discuss: Text-Resize Detection
by Christian Heilmann, Lawrence Carvalho
- Editorial Comments
12 Are you sure this is a good idea?
Running a 200ms interval to check the size? Oy! There must be a better solution. Wait.. there might be. Shaun Inman (with a small contribution of yours truly) figured at least part of this problem out with attaching an onresize event handler to a hidden iframe. I haven’t touched the code in years, but maybe there’s good stuff hidden in there.
http://www.shauninman.com/plete/2004/07/absolutely-positive
posted at 08:56 pm on September 12, 2006 by Dimitri Glazkov
13 Scrollwheel
I am not sure about this comment, you cannot expect everybody to have a mouse with a scrollwheel either and I venture to guess that resizing with keyboard is more common than using the wheel. I myself only have trackpointers at my disposal.
posted at 10:16 am on September 13, 2006 by Christian Heilmann
14 Font Size Stats
Very interesting article and implementation. I’d be very interested to see some stats on the font sizes used by visitors. It’s a common problem with the client coming back saying “when I have the font-size set to the maximum level, the layout breaks.”
If only there were some stats to revert to..
I suppose AJAX could be used to record the font size changes?
posted at 12:04 pm on September 13, 2006 by Andy Crathorne
15 interval
Dmitri, ideally we’d like to be able to use a non-interval solution. There are stopDetector and startDetector methods available if it becomes an issue though. I wouldn’t expect it to though as its not doing anything too heavy.
Thanks for the link. I’ll check it out.
posted at 12:09 pm on September 13, 2006 by Lawrence Carvalho
16 Zoom vs Text size increase
First off, excellent article. I can see this being really useful.
This is slightly off-topic, but what is the rational behind IE7 and Opera zooming, rather than increasing text size. Whilst zooming maintains the site layout, it can make the site really hard to read since there will be lots of horizontal scrolling. If this is what the site designer wanted, they could have used em’s for their sizes (ok images would still be an issue, but not that much on a well designed site).
posted at 12:56 pm on September 13, 2006 by Robin Massart
17 Font size stats
I suspect its mostly related to screen resolution and so if you have these stats you could possibly make an educated guess. Definitely some stats on this might be useful, though I think AJAX would be overkill if reportage is only on font stats. A good old 1×1 transperent beacon gif could do the job just as well.
posted at 01:18 pm on September 13, 2006 by Lawrence Carvalho
18 True resize events (rather than timed)
IE supports an onresize event which is fired when a div changes size due to changed fonts.
And for Firefox and Opera, you can use the resize event of a hidden iframe, and set the height/width of the iframe to ems.
If you are using Dojo, or can read Dojo widget code and widget templates, then functioning code using those techniques is available: http://trac.dojotoolkit.org/ticket/1437 (this also has true pixel measurements of font-sizes and scrollbars which can be very useful).
posted at 02:46 pm on September 13, 2006 by Morris Johns
19 IE7 does have text only zoom
The article is slightly inarrucate. While it is true that IE7 does scroll the entire page when a user uses CTRL+scrollwheel/keyboard buttons, it also allows the user to just resize the text. Page —> Text Size —> the those five options we know and hate.
posted at 04:52 pm on September 13, 2006 by Brian LePore
20 you lost me at..
it’s still extremely difficult to create page layouts that don’t break even if the user increases the type size by more than a few settings
Propaganda of the shoddiest variety. Play around with the technologies at your disposal, by all means let innovation thrive, but it is not innovative to distort reality in such a gross fashion.
posted at 06:01 am on September 14, 2006 by Seth Rasmussen
Discussion Closed
New comments are not being accepted, but you are welcome to explore what people said before we closed the door.
Got something to say?
Discuss this article. We reserve the right to delete flames, trolls, and wood nymphs.
Create a new account or sign in below if you’d like to leave a comment.
Subscribe to this article's comments: RSS (what’s this?)






11 Another bug
The script breaks scroll wheel resizing in Firefox 2 on the submit button demo . I have no idea why is that – all I know it’s serious and forces users to use keyboard for resizing, which is just as bad as forcing keyboard users to use a mouse for a certain task.
posted at 08:15 pm on September 12, 2006 by Mislav Marohnić