0

HOW TO DRAW TEXT WITH SVG?

if the definition of SVG, it said :"we can draw boxes, circle, ... and text" so how it possible to draw text with SVG?

2nd Apr 2017, 1:09 AM
Fabien Godcoder
Fabien Godcoder - avatar
3 Answers
+ 3
<svg width = "200" height = "200" version = "1.1"> <text x = "10" y = "10" fill = "white">Hello World!</text> <text x = "15" y = "30" fill = "white">This is <tspan font-weight = "bold">bold</tspan> and <tspan fill = "red"> red</tspan> </text> <path id = "my_path" d = "M 20,60 C 40,80 80,100 200,60" fill = "transparent" /> <text> <textPath fill = "red" xlink:href = "#my_path">This text follows a curve.</textPath> </text> <text id = "example" x = "0" y = "120" fill = "blue" rotate = "20" >This is an example text.</text> </svg>
2nd Apr 2017, 4:47 AM
Emore Anzolin
Emore Anzolin - avatar
+ 2
look at the tutorial on the html app that sololearn has under the category html5 and lesson SVG
2nd Apr 2017, 1:50 AM
chris
chris - avatar
+ 2
As @chris said, you can find the explanation in the html course. The text following a curve is one of the best thing that svg can do.
2nd Apr 2017, 4:52 AM
Emore Anzolin
Emore Anzolin - avatar