Page zooming in Firefox? IE does it (sort of)

Discussion of features in Mozilla Firefox
james_firefoxrookie
Posts: 36
Joined: February 22nd, 2004, 6:47 am
Location: London, UK

Page zooming in Firefox? IE does it (sort of)

Post by james_firefoxrookie »

I use a high resolution (1920x1440) on my PC, which is useful for some things I do, but not generally for web browsing. Many page (especially those including fixed width tables) display in only a small portion of the screen, and/or have text and images too small for easy viewing.

In windows under ‘display properties’>‘settings’>‘advanced’ there is an option (it might be specific to my graphics card) to increase the size of text and icons. I typically use 150%, obviously making things half as big again.

IE uses this setting when rendering pages. A page opened in Firefox might be 600 pixels wide, the same page opened in IE would be 900 pixels wide – but otherwise look the same. I sometimes end up using IE therefore, when I much prefer Mozilla in every other category.

Mozilla can already re-size text and zoom images, so it surely would not be too hard to implement a similar setting as in IE. Indeed it could be far more powerful and become a ‘feature’, allowing you to, for example, zoom in and out, always zoom to the width of the window, remember specific settings for specific URLs and lots more. Web pages could display more like .pdf documents do.

Any thoughts anybody? Both on my specific problem and page zooming as a feature.
James.
User avatar
allen
Posts: 118
Joined: February 4th, 2003, 1:01 pm
Location: UK

Post by allen »

I think this would be a great idea. As monitor resolutions are increasing, it's becoming increasingly difficult to distinguish (especially older) Web content. The 'increase text size' function is only partially useful, since it breaks the layout of many pages, and does nothing to boost image size.

I'm sure a lot of people will say this should be an extension, that we already have text zoom - but I have to say that if the whole page zoomed, rather than just the text, it'd be much more useful. I'd love to see text zoom as an extension, and this put in its place.

People with poor eyesight would also benefit from this (Firebird could so easily increase its market share if it actively tried to cater to the disabled). Then there's the increasing number of people with wireless keyboards and mice, who would like to sit further away from their monitors on ocassion.

The reasons are there.
mmoy
Posts: 5030
Joined: February 17th, 2004, 9:05 pm
Location: New Hampshire
Contact:

Post by mmoy »

Zoomin Bookmarklet:

javascript:function zoomImage(image, amt) { if(image.initialHeight == null) {image.initialHeight = image.height; image.initialWidth = image.width; image.scalingFactor = 1; } image.scalingFactor *= amt; image.width = image.scalingFactor * image.initialWidth; image.height = image.scalingFactor * image.initialHeight; }function rZoomFont(n, node) {for ( var i = 0; i < node.childNodes.length; i++ ) {if (node.childNodes[i].nodeType == 1) rZoomFont(n, node.childNodes[i]);}startSize = getComputedStyle(node,'').getPropertyValue('font-size');startSize = Number(startSize.substr(0,startSize.length-2));lh = getComputedStyle(node,'').getPropertyValue('line-height');if (lh != 'normal') {lh = Number(lh.substr(0,lh.length-2)) * n + 'px';node.style.lineHeight = lh;}newSize = (startSize * n) + 'px';node.style.fontSize = newSize;}rZoomFont(2,document.getElementsByTagName('body')[0]); for (i=0; i<document.images.length; ++i) zoomImage(document.images[i], 2);

Zoom Out:

javascript:function zoomImage(image, amt) { if(image.initialHeight == null) {image.initialHeight = image.height; image.initialWidth = image.width; image.scalingFactor = 1; } image.scalingFactor *= amt; image.width = image.scalingFactor * image.initialWidth; image.height = image.scalingFactor * image.initialHeight; }function rZoomFont(n, node) {for ( var i = 0; i < node.childNodes.length; i++ ) {if (node.childNodes[i].nodeType == 1) rZoomFont(n, node.childNodes[i]);}startSize = getComputedStyle(node,'').getPropertyValue('font-size');startSize = Number(startSize.substr(0,startSize.length-2));lh = getComputedStyle(node,'').getPropertyValue('line-height');if (lh != 'normal') {lh = Number(lh.substr(0,lh.length-2)) * n + 'px';node.style.lineHeight = lh;}newSize = (startSize * n) + 'px';node.style.fontSize = newSize;}rZoomFont(0.5,document.getElementsByTagName('body')[0]); for (i=0; i<document.images.length; ++i) zoomImage(document.images[i], 0.5);
james_firefoxrookie
Posts: 36
Joined: February 22nd, 2004, 6:47 am
Location: London, UK

Post by james_firefoxrookie »

Thanks for that code mmoy - I have made it two bookmarks and it works.

Any chance of turning it into an extension?

James

BTW: The two sections of code above are identical apart from two numbers (one line from the end, and at the end) They are both 0.5 in the zoom out, and 2 in the zoom in (double and half respectively). For me 1.6 and 0.625 works better.
EdgeOfEpsilon
Posts: 83
Joined: February 10th, 2004, 5:16 pm
Location: Open Source Heaven
Contact:

Post by EdgeOfEpsilon »

How about a bookmarklet that asks you to choose the zoom size?
User avatar
bobharvey
Posts: 148
Joined: January 28th, 2004, 2:11 pm
Location: Lincolnshire

Post by bobharvey »

I've tried the bookmark trick: neat.

Opera has a zoom % pulldown on the address bar, and I like it a lot - but I'm not sure how it would fit in with the bloatware aversion of this project.

Anyway, making all browsers the same would be boring.
mmoy
Posts: 5030
Joined: February 17th, 2004, 9:05 pm
Location: New Hampshire
Contact:

Post by mmoy »

Wasn't my code; someone posted that here and I just grabbed it and post it when someone asks.
Dell E521 X2 5600+ MacBookPro 17'' 2.5 Ghz Penryn Dell M1330 2.0 Ghz Merom 4 GB Vista x64 Compaq r3000z AMD 64 3200+ (Win 32/64) PowerMac G5 1.8 Ghz MMOY-1.5 (OSX 10) Inspiron 8500, 4100, 4000, Dimension 2300 MacBook Pro 2.2 Ghz HP E6600 HP X2 4400+
User avatar
Krane
Posts: 22
Joined: January 22nd, 2004, 5:33 am

Post by Krane »

All-in-One Gestures has image zooming. I've set it to mouse gesture up->zoom in and down->zoom out, very easy and handy.


I second page zooming, I run fairly high resolution of 1280x1024 and some 'trendy' sites using very small text are abit tiresome to read... Page zooming would help heaps readability.
taichi
Posts: 9
Joined: January 23rd, 2003, 1:56 pm

Post by taichi »

At least in windows, you could just hold Ctrl + Scroll up or down on mouse to zoom in or out. (assuming you have a scroll mouse, and if you don't you should)
User avatar
Stefan
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Post by Stefan »

taichi wrote:At least in windows, you could just hold Ctrl + Scroll up or down on mouse to zoom in or out. (assuming you have a scroll mouse, and if you don't you should)


Yes, but that affects only text. People here want images and fixed width tablelayouts etc to scale also.
joto
Posts: 10
Joined: May 1st, 2003, 6:19 pm

Post by joto »

Full page zooming would indeed be a handy boon. A lot of people talk about pages being too small but I find I have the opposite problem a lot of the time. I went and got a huge monitor for a reason. I'd like to have more screen space. But thanks to a bunch of moron web designers I find that I never even SEE my desktop. If I try to make the browser window something less than maximum some stupid fixed width table pops up vertical scroll bars all over my browser.

My favorite is when they get all those small "link to us" buttons going in one row that they won't let wrap around. So like you've got this bar at the bottom of the web page full of little buttons for websites you'll never visit. It's just there to mock you saying "No matter how big a monitor you get I will NEVER let you shrink this window. All your screen real estate are belong to us."

A great example is http://nwvault.ign.com/index2.shtml

No matter how many images I shrink or how I change the text that screwy fixed table widths and odd advertising stuff makes it impossible to shrink my window more than a little bit. Is it possible to make a bookmarklet that shrinks tables too? I think really that would solve the problem in many cases.
mmoy
Posts: 5030
Joined: February 17th, 2004, 9:05 pm
Location: New Hampshire
Contact:

Post by mmoy »

I have a little Context Menu Extension program that's about three or four lines of code where you select the text you want to read and then choose open selection formatted. It opens the text in a new tab with the formatting from the page. I can also open it without the formatting with another context menu option. So many news sites use the format with links and ads on both sides where browser zooming is useless.
Dell E521 X2 5600+ MacBookPro 17'' 2.5 Ghz Penryn Dell M1330 2.0 Ghz Merom 4 GB Vista x64 Compaq r3000z AMD 64 3200+ (Win 32/64) PowerMac G5 1.8 Ghz MMOY-1.5 (OSX 10) Inspiron 8500, 4100, 4000, Dimension 2300 MacBook Pro 2.2 Ghz HP E6600 HP X2 4400+
User avatar
Krane
Posts: 22
Joined: January 22nd, 2004, 5:33 am

Post by Krane »

joto wrote:...If I try to make the browser window something less than maximum some stupid fixed width table pops up vertical scroll bars all over my browser.
...."No matter how big a monitor you get I will NEVER let you shrink this window. All your screen real estate are belong to us."
A great example is http://nwvault.ign.com/index2.shtml
I can make the window 70% smaller than full windowsize before vertical scrollbars appear on that page...

So your problem isn't a small monitor, it's small resolution. I have 1280x1024 on my 20" Sun and I guess you have 1024x768, which iirc/afaik is default resolution for a 17" monitor (correct me if I'm wrong).




Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040224 Firefox/0.8.0+
User avatar
Peter(6)
Posts: 13011
Joined: September 4th, 2003, 1:26 am
Location: Maassluis, The Netherlands

Post by Peter(6) »

There's little to choose (resolution) if you have a tft monitor.
It would be nice if someone could combine the bookmarklets with Ctrl+/- into 1 extension and create the pagezoom like only Opera has.
Preferably like Opera, with ctrl+/- as zoom commands.

Added comment:
The bookmarklets can only zoom images if it's a plain page, if frames are used than it doesn't work, so obviously some work has to be done to mod the bookmarklet aswell
Last edited by Peter(6) on February 26th, 2004, 5:42 am, edited 2 times in total.
nightly build threads 20040225 (FF 0.8.0+) - 20120331 (FF14a)
james_firefoxrookie
Posts: 36
Joined: February 22nd, 2004, 6:47 am
Location: London, UK

Post by james_firefoxrookie »

I'd like to see it as an extension as well. I started to have a crack but my codeing skills weren't up to it, so I gave up fairly quickly.

Maybe worth asking politly in the extension forum?

James
Post Reply