

SVG text using automatic horizontal positions with absolute vertical positions However, many style options affect the final position of the characters, and the following chapters will introduce these complexities.įigure 4-1. This chapter discusses the basic attributes to position spans of text, showing how you can move the virtual typewriter to a new point on the page. Individual spans of SVG text can be shifted from their natural position, or repositioned completely. This is true not only for normal paragraph-like text wrapping, but also for an area in which SVG excels: complex text layouts used in posters, advertisements, and poetry. However, you often still want to coordinate the position of different words to reflect that they are part of a continuous whole. For this reason, when text consists of more than independent short labels, individual elements positioned at explicit points on the page are usually insufficient.įor longer text, you need to break the text into smaller chunks to position them separately. It does not-in SVG 1.1, anyway-have any way of wrapping text to a new line. A single SVG element creates a single line of text.
