Mobile app version of vmapp.org
Login or Join
Michele215

: SVG image not displaying CSS base-64 data URL encoded fonts in Illustrator I'm dynamically generating an SVG that includes text and a font using an embedded base-64 font-face with this method:

@Michele215

Posted in: #AdobeIllustrator #Svg

I'm dynamically generating an SVG that includes text and a font using an embedded base-64 font-face with this method: How do I embed Google Web Fonts into an SVG?

<defs>
<style>
@font -face {
font-family: 'My Font';
src: url(data:application/font-woff;charset=utf-8;base64,...) format('woff2');
font-weight: normal;
font-style: normal;
}
text {
font-family: 'My Font', 'Arial', sans-serif;
}
</style>
</defs>
<text>Hello World</text>


(Where ... is the long base-64 encoded string.)

When I download the file and open it in my browser (Chrome), I see the text in the correct font, but when I open the file in Adobe Illustrator (CS5), the font is not shown. Instead I see some text in Arial, the fallback font. Is Illustrator picky about some SVG formatting? Does it not know how to parse base-64 data URLs?

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Michele215

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme