The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › Other › Adding dynamic text to SVG?
I’m looking for an easy way to add a bit of dynamic text to a svg graphic. Basically, I need to change a few characters (<50) next to a logo, and have it display in the correct font. Anyone done this?
Js/JQ is the way I’d go.
Without looking at the link above, it might be as simple as grabbing the html from inside the text sub-element and swapping it out.
I think the text-anchor would be important though for alignment issues and then there is overflow / line breaks…not sure how that would be affected.
I’ll also have to look into font-linking as it may not be as simple as it might first appear.
I think I’ll take a look at that link and run some ideas through Codepen…..tomorrow.