I'm embedding SVGs in my page with the <object>
tag, and they're supposed to utilize Google Fonts (e.g. Roboto). However, the SVGs aren't picking these fonts up and instead default to system fonts.
What am I doing wrong? Does every SVG require that the font itself be embedded in <style>
?
Example code:
<head> <link href='https://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'> </head> <body> <object width="250" height="200" type="image/svg+xml" data="img/popup_image.svg"></object> </body>
SVG snippet:
<text font-size="14" fill="#333" font-family="Roboto">Words go here</text>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With