josa42 / atom-svg-preview

Live SVG preview for Atom editor
MIT License
51 stars 14 forks source link

Importing font with xml-stylesheet doesn't work #35

Closed jonthesquirrel closed 6 years ago

jonthesquirrel commented 8 years ago

Here is the svg code:

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="https://fonts.googleapis.com/css?family=Lobster" ?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="300" height="300">

<rect fill="black" width="300" height="300"></rect>
<text fill="white" font-family="Lobster" font-size="200" x="60" y="190">J</text>

</svg>

This is the image in Chrome. Notice how the font from the xml-stylesheet line is loaded. image

This is the image in SVG Preview, and unfortunately the font doesn't load. image