Bug 719286 - Tests for change in OpenType-in-SVG font format r=roc

This commit is contained in:
Edwin Flores 2012-09-06 16:58:47 +12:00
parent 4eea67267a
commit 818b186df0
6 changed files with 130 additions and 113 deletions

View File

@ -0,0 +1,22 @@
<svg xmlns="http://www.w3.org/2000/svg">
<!--
Basic test SVG glyphs
Covers glyph ID range 1 (L\xfe01) to 47 (M)
-->
<!-- char = L -->
<g glyphid="46">
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
stroke="black" fill="red"/>
<rect x="100" y="-1000" width="100" height="100" stroke="none"
fill="turquoise" />
</g>
<!-- L with a UVS selector -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
stroke="black" fill="green" glyphchar="L&#xfe01;"/>
<!-- M -->
<rect x="50" y="-950" width="900" height="900" stroke-width="100"
fill="pink" stroke="hotpink" glyphchar="M"/>
</svg>

After

Width:  |  Height:  |  Size: 664 B

View File

@ -0,0 +1,24 @@
<svg xmlns="http://www.w3.org/2000/svg">
<!--
Test SVG glyphs for text object pattern inheritance
Covers glyph ID range 48 (N) to 51 (Q)
-->
<!-- -moz-objectfill, no stroke -->
<!-- N -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
stroke="none" fill="-moz-objectFill" glyphchar="N"/>
<!-- O -->
<rect x="50" y="-950" width="900" height="900" stroke-width="100"
fill="-moz-objectFill" stroke="none" glyphchar="O"/>
<!-- -moz-objectstroke -->
<!-- P -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
stroke="-moz-objectStroke" fill="burlywood" glyphchar="P"/>
<!-- both -moz-objectstroke and -moz-objectfill -->
<!-- Q -->
<rect x="50" y="-950" width="900" height="900" stroke-width="100"
fill="-moz-objectStroke" stroke="-moz-objectFill" glyphchar="Q"/>
</svg>

After

Width:  |  Height:  |  Size: 846 B

View File

@ -0,0 +1,59 @@
<svg xmlns="http://www.w3.org/2000/svg">
<!--
Test SVG glyphs for text object opacity inheritance
Covers glyph ID range 52 (R) to 59 (Y)
-->
<!-- R -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="-moz-objectFill" stroke="-moz-objectStroke"
fill-opacity="-moz-objectFillOpacity"
stroke-opacity="-moz-objectStrokeOpacity" glyphchar="R"/>
<!-- S -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="-moz-objectFill" stroke="-moz-objectStroke"
fill-opacity="-moz-objectStrokeOpacity"
stroke-opacity="-moz-objectFillOpacity" glyphchar="S"/>
<!-- T -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="-moz-objectStroke" stroke="-moz-objectFill"
fill-opacity="-moz-objectFillOpacity"
stroke-opacity="-moz-objectStrokeOpacity" glyphchar="T"/>
<!-- U -->
<!-- Test for bug where explicit `inherit' would fail for
*-opacity="objectStrokeOpacity" or "objectFillOpacity" -->
<g style="fill-opacity : -moz-objectStrokeOpacity; stroke-opacity : -moz-objectFillOpacity">
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="-moz-objectStroke" stroke="-moz-objectFill"
fill-opacity="inherit" stroke-opacity="inherit" glyphchar="U"/>
</g>
<!-- W -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="darkorchid" stroke="goldenrod"
fill-opacity="-moz-objectFillOpacity"
stroke-opacity="-moz-objectStrokeOpacity" glyphchar="W"/>
<!-- X -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="darkorchid" stroke="goldenrod"
fill-opacity="-moz-objectStrokeOpacity"
stroke-opacity="-moz-objectFillOpacity" glyphchar="X"/>
<style type="text/css"><![CDATA[
#yparent {
fill-opacity : -moz-objectFillOpacity;
stroke-opacity : -moz-objectStrokeOpacity;
}
#ychild {
color-interpolation : sRGB;
}
]]></style>
<!-- Y -->
<g glyphchar="Y" id="yparent">
<rect x="100" y="-900" width="800" height="300" stroke="red" stroke-width="50"/>
<rect x="100" y="-400" width="800" height="300" stroke="red" stroke-width="50" id="ychild" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,25 @@
<svg xmlns="http://www.w3.org/2000/svg">
<!--
Test SVG glyphs for text object stroke value inheritance
Covers glyph ID range 67 (a) to 70 (d)
-->
<!-- a -->
<rect x="100" y="-900" width="800" height="800" stroke="powderblue"
stroke-width="50" stroke-dashoffset="35"
stroke-dasharray="50 50" glyphchar="a" />
<!-- b -->
<rect x="100" y="-900" width="800" height="800" stroke="chartreuse"
stroke-width="50" stroke-dashoffset="35"
stroke-dasharray="-moz-objectValue" glyphchar="b" />
<!-- c -->
<rect x="100" y="-900" width="800" height="800" stroke="sienna"
stroke-width="50" stroke-dasharray="50 50"
stroke-dashoffset="-moz-objectValue" glyphchar="c" />
<!-- d -->
<rect x="100" y="-900" width="800" height="800" stroke="olivedrab"
stroke-width="-moz-objectValue" stroke-dasharray="-moz-objectValue"
stroke-dashoffset="-moz-objectValue" glyphchar="d" />
</svg>

After

Width:  |  Height:  |  Size: 919 B

View File

@ -1,113 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg">
<!-- This is the XML document contained in the 'SVG ' table of svg.woff -->
<!-- char = L -->
<g glyphid="46">
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
stroke="black" fill="red"/>
<rect x="100" y="-1000" width="100" height="100" stroke="none"
fill="turquoise" />
</g>
<!-- L with a UVS selector -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
stroke="black" fill="green" glyphchar="L&#xfe01;"/>
<!-- M -->
<rect x="50" y="-950" width="900" height="900" stroke-width="100"
fill="pink" stroke="hotpink" glyphchar="M"/>
<!-- -moz-objectfill, no stroke -->
<!-- N -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
stroke="none" fill="-moz-objectFill" glyphchar="N"/>
<!-- O -->
<rect x="50" y="-950" width="900" height="900" stroke-width="100"
fill="-moz-objectFill" stroke="none" glyphchar="O"/>
<!-- -moz-objectstroke -->
<!-- P -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
stroke="-moz-objectStroke" fill="burlywood" glyphchar="P"/>
<!-- both -moz-objectstroke and -moz-objectfill -->
<!-- Q -->
<rect x="50" y="-950" width="900" height="900" stroke-width="100"
fill="-moz-objectStroke" stroke="-moz-objectFill" glyphchar="Q"/>
<!-- testing -moz-objectfillopacity and -moz-objectstrokeopacity -->
<!-- R -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="-moz-objectFill" stroke="-moz-objectStroke"
fill-opacity="-moz-objectFillOpacity"
stroke-opacity="-moz-objectStrokeOpacity" glyphchar="R"/>
<!-- S -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="-moz-objectFill" stroke="-moz-objectStroke"
fill-opacity="-moz-objectStrokeOpacity"
stroke-opacity="-moz-objectFillOpacity" glyphchar="S"/>
<!-- T -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="-moz-objectStroke" stroke="-moz-objectFill"
fill-opacity="-moz-objectFillOpacity"
stroke-opacity="-moz-objectStrokeOpacity" glyphchar="T"/>
<!-- U -->
<!-- Test for bug where explicit `inherit' would fail for
*-opacity="objectStrokeOpacity" or "objectFillOpacity" -->
<g style="fill-opacity : -moz-objectStrokeOpacity; stroke-opacity : -moz-objectFillOpacity">
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="-moz-objectStroke" stroke="-moz-objectFill"
fill-opacity="inherit" stroke-opacity="inherit" glyphchar="U"/>
</g>
<!-- W -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="darkorchid" stroke="goldenrod"
fill-opacity="-moz-objectFillOpacity"
stroke-opacity="-moz-objectStrokeOpacity" glyphchar="W"/>
<!-- X -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="darkorchid" stroke="goldenrod"
fill-opacity="-moz-objectStrokeOpacity"
stroke-opacity="-moz-objectFillOpacity" glyphchar="X"/>
<style type="text/css"><![CDATA[
#yparent {
fill-opacity : -moz-objectFillOpacity;
stroke-opacity : -moz-objectStrokeOpacity;
}
#ychild {
color-interpolation : sRGB;
}
]]></style>
<!-- Y -->
<g glyphchar="Y" id="yparent">
<rect x="100" y="-900" width="800" height="300" stroke="red" stroke-width="50"/>
<rect x="100" y="-400" width="800" height="300" stroke="red" stroke-width="50" id="ychild" />
</g>
<!-- a -->
<rect x="100" y="-900" width="800" height="800" stroke="powderblue"
stroke-width="50" stroke-dashoffset="35"
stroke-dasharray="50 50" glyphchar="a" />
<!-- b -->
<rect x="100" y="-900" width="800" height="800" stroke="chartreuse"
stroke-width="50" stroke-dashoffset="35"
stroke-dasharray="-moz-objectValue" glyphchar="b" />
<!-- c -->
<rect x="100" y="-900" width="800" height="800" stroke="sienna"
stroke-width="50" stroke-dasharray="50 50"
stroke-dashoffset="-moz-objectValue" glyphchar="c" />
<!-- d -->
<rect x="100" y="-900" width="800" height="800" stroke="olivedrab"
stroke-width="-moz-objectValue" stroke-dasharray="-moz-objectValue"
stroke-dashoffset="-moz-objectValue" glyphchar="d" />
</svg>

Before

Width:  |  Height:  |  Size: 4.1 KiB