How do I out an icon (e.g. font-awesome) into an SVG element?
I want that this is centered in the circle.
<svg class="svg" width=100 height=100>
<circle cx=50 cy=50 r=25>
</circle>
<i class="icon-check"></i>
</svg>
Here is a test: http://jsfiddle.net/L2Lm3fgm/
Just find out the code for the character font-awesome is using in its class, and use that character as a
text
node. Remember to group thecircle
and thetext
node together.Example:
Example Fiddle: http://jsfiddle.net/abhitalks/L2Lm3fgm/2/