Like many of you I would like to advance the use of SVG only web design. Unless I am missing something, one problem that exists is the automatic Y-axis scaling of designs with text. Specifically what I am referring to is the fact that the flow text box "dead ends" once it is full unlike an html div that can continue to autosize in the Y-Axis(or X).
In addition even if the flow text box did resize other elements in the design would not. If for instance we had a blue square for a background and some text in the center then the blue box would also need to resize to prevent the text from flowing past the bottom of it.
My programming skills are not up to standard with the rest of you but if you would like, I could hack together a proof of concept in Python, if it was of value someone could re-do it in C and you folks could figure out a where and how to use it in the GUI.
By counting line numbers and the pixel height of the letters, I should be able to calculate the size the flow text box should be and then I could use those attributes to resize other attributes.
Am I missing something? Is this a dumb idea? -Patrick
I think you're trying to use the wrong tool. SVG is meant for scalable graphics that are not influenced by browser settings, with interactivity and animation. In fact its intent is to be like the animation components of Flash. If you want a resizable text box in an SVG document you should code it in JavaScript. Alternatively you can use HTML, which is designed for dynamic layout.
When it comes to the flowed text, it's not even an SVG feature but an Inkscape-specific hack that saves to a regular text element when saved as plain SVG.
Regards, Krzysztof Kosiński.
participants (2)
-
Krzysztof Kosiński
-
Patrick