- From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
- Date: Mon, 22 Apr 2013 15:03:09 +0100
- To: www-svg@w3.org
I think, if one already has a program, that has the capability to fill a rectangle with text (XHTML-style), it is not much more difficult to fill an arbitrary convex shape with some text. The main problem is what happens, if there is more text as area to fill, but this can appear for XHTML+CSS as well. non-convex shape are slightly more difficult, but still a solvable problem. (To warp glyph groups to fit exactly into an area is maybe much more complex and it a different task.) There is already a minimalistic simulation using CSS to adjust the text to a shape, see here: http://meyerweb.com/eric/css/edge/raggedfloat/demo.html Obviously to get this with SVG one has to count and position glyphs manually today - some parts of the show are easier in SVG to manage, some are more difficult. If one has a monospace font and a shape with known parametrisation, it should be no big problem to solve the problem with a script language like PHP as well. And as long as SVG does not provide such feature, one has to do it in such a way even for more complex shapes, if one needs it. Therefore for each use case each author has to reinvent the wheel here so solve detail problems like positioning of each glyph to get something like CSS:text-align: justify for such a shape or maybe to estimate glyph area sizes and shape area size to get the font-size scaled in such a way, that a text fits into the shape. Another method is to use an arbitrary tool to create the arranged text as path/shape construct, exporting only this path to the SVG document and no text. The advantage is, that one can earn money with such a tool, if one does not tell other people, how it exactly works ;o) About accessibility: Obviously if an author can simply put the complete text inside one element and the SVG viewer does the job to arrange everything inside a shape, is more accessible as the current method, that authors use no text at all and present everything as an arbitrary shape construct, because such a feature is missing and additionally due to bugs and gaps in viewers there is no control with SVG fonts. But even this can be simply managed with already existing SVG versions: Simply put the text additionally into a desc element. If we want SVG viewers to solve non trivial use cases, such a feature can be quite important. If there is more desire to assist tool programers and software licence advocates, it is much better not to provide such features for free ;o) Olaf
Received on Monday, 22 April 2013 14:03:44 UTC