Prevent fonts from being removed inside a <defs>

This commit is contained in:
JSCHILL1 2009-04-19 08:08:37 -05:00
parent 72363ec24b
commit 8d0bb8fe55
4 changed files with 47 additions and 1 deletions

View file

@ -0,0 +1,16 @@
<svg xmlns='http://www.w3.org/2000/svg'>
<defs>
<font id="Font1" horiz-adv-x="1000">
<font-face font-family="Super Sans" font-weight="bold" font-style="normal"
units-per-em="1000" cap-height="600" x-height="400"
ascent="700" descent="300"
alphabetic="0" mathematical="350" ideographic="400" hanging="500">
<font-face-src>
<font-face-name name="Super Sans Bold"/>
</font-face-src>
</font-face>
<missing-glyph><path d="M0,0h200v200h-200z"/></missing-glyph>
</font>
</defs>
<text x="100" y="100" style="font-family: 'Super Sans', Helvetica, sans-serif">Text</text>
</svg>

After

Width:  |  Height:  |  Size: 657 B

View file

@ -0,0 +1,16 @@
<svg xmlns='http://www.w3.org/2000/svg'>
<defs>
<font id="Font1" horiz-adv-x="1000">
<font-face font-family="Super Sans" font-weight="bold" font-style="normal"
units-per-em="1000" cap-height="600" x-height="400"
ascent="700" descent="300"
alphabetic="0" mathematical="350" ideographic="400" hanging="500">
<font-face-src>
<font-face-name name="Super Sans Bold"/>
</font-face-src>
</font-face>
<missing-glyph><path d="M0,0h200v200h-200z"/></missing-glyph>
</font>
</defs>
<text x="100" y="100" style="font-family: Helvetica, sans-serif">Text</text>
</svg>

After

Width:  |  Height:  |  Size: 643 B