« 2005-05-16 Weekly Update | Main | Call for opinion: <foreignObject> in Firefox 1.1 »
June 1, 2005
Call for opinion: text-zoom interaction with SVG
Currently the browser text-zoom value causes a corresponding increase/decrease in the size of SVG text. We have a patch that would change that behavior (bug 291785), but there is a thought that for consistency all fonts on the page should change with text-zoom. In the future when text-zoom is replaced with page-zoom, the SVG area will be also increased proportionally in size.
Posted by tor at June 1, 2005 7:19 PM
Comments
That certainly would depend on how much the text seems to "belong" to the SVG image from a user perspective. Nothing a webclient can easily decide. But as layouts break often anyway with the current implementation it probably would be better if zooming were enabled for SVG text as well. More control to the user, even if that breaks some things.
Posted by: tr at June 1, 2005 8:05 PM
My belief is that we should separate the two mechanisms. Right now, I use SVG pan & zoom to provide the user with scaling of my SVG content. If the user has a different font scaling set up for HTML it really destroys the SVG content. I strongly believe that we need to provide users with control over the font sizes, but I think that the text zoom mechanism is not the most appropriate for SVG.
Posted by: Scooter at June 1, 2005 8:16 PM
I don't think text in SVG should scale with text scaling in the browser. Scaling in SVG should be done using SVG's zooming capabilities and not using docshell scaling, even if SVG zooming capabilities don't actually exist now.
Posted by: Jeff Walden at June 1, 2005 10:20 PM
Unless you plan on matching the SVG text zoom with the zoom of the rest of the SVG graphics, there probably shouldn't be any SVG text zoom interaction. On the other hand, perhaps you could make a binding available that the web author could use to say "yes, I do want this scaled with the text in the rest of the page"
Posted by: Racer at June 2, 2005 12:58 AM
Text position is very important in SVG. It is often literally tied into the rest of the images. Even in the small SVG on my website, it would already break because the text would flow outside of the SVG box boundaries, causing it to be cropped.
This is where it’s different from regular HTML + CSS, which is designed to being relatively ‘fluid’ and not pixel-perfect.
So, I think it should not resize along with the rest of the text, unless the SVG as a whole is resized as well.
~Grauw
Posted by: Laurens Holst at June 2, 2005 2:25 AM
As someone with bad eyes, being able to easily scale content up makes the difference between reading something or not. Though if scaled text would be rendered incomprehensible in most SVG uses, I don't suppose there's much difference.
Posted by: Axord at June 2, 2005 2:53 AM
I'm the reporter :)
And my understanding of SVG is: it is an image (in the sense of "painting"). And any text within is part of this image.
Text in HTML (if done right) can grow in size without affecting the sense, the meaning of the HTML page. If text grows, the rest of the content just moves a little down the page and remains in context.
In an SVG, text is put at a certain position as i.e. a label to some graphical object. If size grows this text might end up on a different position, might seem to belong to the wrong object, get out of context ...
SVG should only grow as a whole object.
Posted by: Jens at June 2, 2005 6:26 AM
I'd say (for the same reasons as Jens above) that SVG text should only scale with the whole SVG, but ForeignObject HTML should scale independently. (I don't have an SVG build here to check if it already does, sorry.)
Posted by: Andy at June 2, 2005 8:35 AM
I think SVG text should zoom along with the other text. The user should not have to know how the text got in the view port and the author should not have the means to deprive users of the ability to zoom. Firefox is an User Agent—not an Author Agent. (Yes, there are clueless/malicious authors who use the px unit, because it prevents zooming in IE.)
Ideally, the SVG graphics would zoom as well at the same time.
Posted by: Henri Sivonen at June 2, 2005 8:43 AM
Ideally Mozilla would have page zoom which would apply to everything.
For this issue, I think it's better that text-zoom applies to all content as the visitor shouldn't have to care about what format the content is in.
Posted by: Anne at June 2, 2005 10:18 AM
For accessibility reasons I'd say that allowing SVG text to zoom is a good idea in the short term. In the long term it would be better if the entire image scaled but, if that's not viable in the short term, the possibility of adversly affecting some images is less important than the possibility that users might not be able to read any of the text on the image.
Posted by: jgraham at June 2, 2005 11:42 AM
A page zoom capability which uniformly scales up both text and images (in html) and the entire svg viewport (for svg) would be much better than trying to scale up text in the SVG. The geometric relationship between the svg text and svg paths and so forth would be lost. Text on a path would be problematic. Legibility would suffer. The way to get larger text in SVG is to zoom in, and then pan around.
Text scaling on an outer xhtml, on the other hand, should pass through the svg and on to any child xhtml (for example, in a foreignObject element) which should be affected, as it will reflow.
Posted by: Chris Lilley at June 2, 2005 4:48 PM
It is important that text scales simultaneously with the rest of the SVG graphics elements. Pixel-Precise, reproducable layout is very important and key to SVG graphics and application.
Zooming of SVG graphics as a whole as part of general page-based zooming makes sense to me.
I also see the importance of separate zoom and pan controls to allow zooming of svg content only, as it is the case with other svg viewers. Zooming/panning is very important for detailed vector graphics, such as maps or technical drawings. Without the ability to zoom and pan in svg content one looses one of the biggest advantages of vector graphics.
Posted by: Andreas Neumann at June 3, 2005 10:13 AM
I am voting for "zoom" should affect the whole SVG and not just the text. Jens captured all my arguments.
Posted by: Jeff Schiller at June 4, 2005 6:56 AM
If zooming the text in an SVG image results in an illegible puddle, or captions floating around the screen, it's obviously useless, and if the image as a whole doesn't zoom, I don't see how this can be avoided. Wait for full page zooming, or else zoom the entire SVG image with the text.
Posted by: Bill Mercer at June 5, 2005 7:43 AM
I agree with Chris Lilley (I think). Text should scale exactly as the whole SVG scales, and that applies to zoom.
Posted by: AndrewMain at June 5, 2005 10:16 AM
Page/SVG zoom yes, text only zoom no. Using SVG for banners etc. - design will be broken by this behaviour...
Posted by: Marek Raida at June 6, 2005 9:39 AM
My vote goes for zooming only the SVG as a whole. If HTML is broken from this point of view and text zooms independently from all the other elements you should not cripple SVG just for backwards compatibility. To understand my point try viewing some HTML sites at 500% and see how horrible they look. Text usually overlaps with graphics and other text and that is not easier but almost impossible to read. On the other hand zooming SVG should resize every element proportionally, thus causing no overlapping.
Posted by: Catalin Hritcu at June 7, 2005 3:12 PM
My vote goes for zooming only the SVG as a whole. If HTML is broken from this point of view and text zooms independently from all the other elements you should not cripple SVG just for backwards compatibility. To understand my point try viewing some HTML sites at 500% and see how horrible they look. Text usually overlaps with graphics and other text and that is not easier but almost impossible to read. On the other hand zooming SVG should resize every element proportionally, thus causing no overlapping.
Posted by: Catalin Hritcu at June 7, 2005 3:13 PM
My advice is to leave SVG text unaffected by text-zoom feature in the browser. This says it all:
"In the future when text-zoom is replaced with page-zoom, the SVG area will be also increased proportionally in size."
Wait for page zoom! Do it properly - don't rush into a temporary user-interface patch, you know it makes sense.
Posted by: tim pagden at June 10, 2005 9:54 AM
Generally, the only people who use the text-zoom are people who need to see larger text regardless of aesthetics. It would be a shame if they can't get it.
On the other hand, using svg as a banner would usually mean the text is already much larger than the content text and scaling is completely unnecessary, even annoying for users that need bigger content text.
It would be great if the web developer could prevent svg text zooming (eg as an argument), instead of needing to embed the text in an image. This may very well not be possible.
Posted by: Will Hardy at June 11, 2005 7:45 PM
i think its not a good idea to zoom the text only, mostly because text zoom is there to increase readability, which will not work in SVG, in fact in most cases text zoom in SVG will destroy readability, because there is no text flow in SVG and so individual text elements will overlap. imagine a simple bar chart, with caption; zooming the caption, without zooming the whole bar chart will make it impossible to read anything.
my proposal is to react to textzoom in the following way, if you use em(or ex) to specify the width and height(width="10em") of an SVG fragment, or on an object containing an SVG the whole SVG is zoomed along with the text, otherwise leave the text as it is, and give the user the posibility to individualy zoom and pan the SVG fragments/documents. doing it this way will enable text zoom to still increase readabiltity, while providing a way to take the text zoom feature further, think of icons that scale along with their caption.
Posted by: holger at June 12, 2005 11:59 AM
Can we put a fork in this and call it done? The biggest problem with the current text zooming is that the user gets really surprised. If I had previously used text zooming to increase my fonts in HTML, then open up a page with SVG, my fonts look like junk because text zooming is "sticky". Because so much of the web graphics today are based on GIFs, the reader won't immediately understand what happened to them. I would lobby strongly that we check this in, and push to get the SVG Pan and Zoom capability checked in also. Then we might think about ways in which we could link the two such that when I zoom my text, I also zoom my SVG. That would offer the accessibility features of text zooming without losing the very important presentational features of SVG.
Posted by: Scooter Morris at June 17, 2005 5:18 PM
When users/authors make use of SVG, it is mainly for presentation and graphics. If we let the text size within the graphics change without affecting the surrounding presentation elements, that defeats the purpose of using SVG. In my view, the text in SVG is "SVG drawing"; it's not regular text. Therefore, zooming the text alone in SVG, doesn't make sense. Otherwise, zoom the whole page; not just partial contents.
Also, how would this zooming integrate with other animation effects for both textual and non-textual SVG?
Posted by: Prashantha Shet at June 24, 2005 1:21 AM
I agree with Penis. Nice work and great ideas.
Oh... and my preference is to zoom SVG in its entirety or not at all.
Posted by: Amos at July 15, 2005 7:13 PM