XML technologies / SVG / Using text elements / Available SVG tags for text elements / The attributes of the text tag
(Excerpt from “Das Einsteigerseminar SVG — Webgrafiken mit XML” by Helma Spona)
The <text> tag also has several attributes, mainly universal ones. It has the attributes x, y, textLength, lengthAdjust, style and id.
Use x and y to set the text’s position, always referring to its lower-left corner. Text at 0/0 is therefore invisible. Text 16 pixels high must be positioned at least at 0/16 to be fully visible. The id attribute names text for reuse elsewhere, as explained on the next page.
Note:
If you neither specify the attributes x and y nor align the text to a path, it is created at 0/0 and remains invisible.
The attribute textLength sets the text width. It is useful only together with the attribute lengthAdjust, which determines how the desired width is achieved. Available values are spacing and spacingAndGlyphs. With spacing, only the spacing between letters changes; with spacingAndGlyphs, individual characters are also adjusted if necessary.
Note:
Adobe SVG Viewer supports neither attribute.
Copyright © verlag moderne industrie GmbH 2001
You may print the online version for your private use.
Otherwise, this chapter from “Das Einsteigerseminar SVG — Webgrafiken mit XML” is subject to the same conditions as the bound edition. The work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
verlag moderne industrie GmbH, Justus-von-Liebig-Straße 1, D-86899 Landsberg/Lech, fon ++49 (0) 81 91 / 125 – 0, leserservice(at)mi-verlag.de
back to top