Fonts

SVG can be used for the presentation of both free-standing blocks of text (which are displayed similarly to HTML text) and text that partly forms graphics. In both types of uses, the graphic designer must have control over the appearance of the text onscreen.

For these types of situations, a designer needs to know that the chosen font, or something similar to it, is available to create the desired visual appearance whether or not that font has been installed on the user’s computer. One option is to use the font-family property to specify a list of fonts, in the order of most desirable first, which the SVG viewer should use to render the applicable text.

However, on some occasions, particularly if a specific artistic appearance is sought, ...

Get Designing SVG Web Graphics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.