How To Adjust The Baseline Alignment Of SVG Text

When you set coordinates to position SVG text, you’re setting the location of the left edge of the text and you’re setting the location of the baseline of the font. Last week I showed how you could adjust the former through the text-anchor attribute and today I want to show you how you can adjust the latter.

Continue reading

SVG Text Layout And Alignment

At the start of this series on SVG text I mentioned font tables. I said that certain alignment details for rendering a font’s glyphs were contained inside those tables. I also mentioned at some point in the series we’d see how we could alter some of this information

Continue reading

How To Reuse SVG Text With The tref Element

Writing SVG code once and being able to use it in multiple places helps you write more modular code and it helps make maintenance easier. SVG makes it easy to reuse text through the tref element.

Continue reading

How To Style and Position SVG Text With The tspan Element

The SVG text element allows you to easily position and style text, but what do you do if you want to position and style different parts of the text differently? Do you need to create multiple text elements? Nope. There’s an easier way.

Continue reading

How To Manipulate SVG Text

Last week I showed you how to create SVG text using the <text> element. In the examples I added x and y coordinates to position the text and the individual characters in a string of SVG text. There’s more to the <text> element.

Continue reading