Bug 906521. Part 8: Fix text-svgglyphs reftests. r=jfkthame

--HG--
extra : rebase_source : cceed09be0eb7490a5ab859d35609feee500e53b
This commit is contained in:
Robert O'Callahan 2013-08-23 14:14:07 +12:00
parent 9ee8fe3acb
commit 54da941cdc
19 changed files with 44 additions and 142 deletions

View File

@ -1,18 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
/* font with the SVG glyph for the cat face U+1f431 remapped to
the BMP smiling-face character U+263a */
@font-face { font-family: foo; src: url("resources/cat_face-bmp.ttf"); }
body { font-family: foo, sans-serif; font-size: 24px; }
td { padding: 2px 10px }
</style>
</head>
<body>
<table>
<tr><td>&#x263a;</td><td>ネコ</td><td>cat face</td></tr>
</table>
</body>
</html>

View File

@ -1,16 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
/* no SVG cat-face glyph, so this should NOT match the testcases */
body { font-family: sans-serif; font-size: 24px; }
td { padding: 2px 10px }
</style>
</head>
<body>
<table>
<tr><td>&#x263a;</td><td>ネコ</td><td>cat face</td></tr>
</table>
</body>
</html>

View File

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
/* font with an SVG glyph for the cat face U+1f431 */
@font-face { font-family: foo; src: url("resources/cat_face.ttf"); }
body { font-family: foo, sans-serif; font-size: 24px; }
td { padding: 2px 10px }
</style>
</head>
<body>
<table>
<tr><td>&#x1f431;</td><td>ネコ</td><td>cat face</td></tr>
</table>
</body>
</html>

View File

@ -18,8 +18,3 @@ pref(gfx.font_rendering.opentype_svg.enabled,true) == svg-glyph-cachedopacity
pref(gfx.font_rendering.opentype_svg.enabled,true) == svg-glyph-objectvalue.svg svg-glyph-objectvalue-ref.svg pref(gfx.font_rendering.opentype_svg.enabled,true) == svg-glyph-objectvalue.svg svg-glyph-objectvalue-ref.svg
pref(gfx.font_rendering.opentype_svg.enabled,true) fails == svg-glyph-mask.svg svg-glyph-mask-ref.svg # bug 872483 pref(gfx.font_rendering.opentype_svg.enabled,true) fails == svg-glyph-mask.svg svg-glyph-mask-ref.svg # bug 872483
# test for a non-BMP character in the glyphchar attribute (bug 875629)
pref(gfx.font_rendering.opentype_svg.enabled,true) != cat_face-bmp.html cat_face-notref.html
pref(gfx.font_rendering.opentype_svg.enabled,true) == cat_face.html cat_face-bmp.html
# test for a variation sequence involving a Plane-1 char and Plane-14 variation selector (bug 875629)
pref(gfx.font_rendering.opentype_svg.enabled,true) == two_cats-var.html two_cats-ref.html

View File

@ -0,0 +1,10 @@
Fonts in this directory:
rubbish.woff contains an SVG table with the contents of rubbish.txt. This is
not a valid SVG table so no SVG glyphs will be used.
nosvg.woff is derived from the "Liberation" font. It contains no SVG table.
svg.woff is nosvg.woff with an SVG table added. The
table contains the glyph documents glyphs-base.svg, glyphs-objectcolor.svg,
glyphs-objectopacity.svg and glyphs-objectstroke.svg.

View File

@ -1,22 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg"> <svg xmlns="http://www.w3.org/2000/svg">
<!-- <!--
Basic test SVG glyphs Basic test SVG glyphs
Covers glyph ID range 1 (L\xfe01) to 47 (M) Covers glyph ID 46
--> -->
<!-- char = L --> <!-- char = L -->
<g glyphid="46"> <g id="glyph46">
<rect x="100" y="-900" width="800" height="800" stroke-width="50" <rect x="100" y="-900" width="800" height="800" stroke-width="50"
stroke="black" fill="red"/> stroke="black" fill="red"/>
<rect x="100" y="-1000" width="100" height="100" stroke="none" <rect x="100" y="-1000" width="100" height="100" stroke="none"
fill="turquoise" /> fill="turquoise" />
</g> </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> </svg>

Before

Width:  |  Height:  |  Size: 664 B

After

Width:  |  Height:  |  Size: 349 B

View File

@ -6,19 +6,19 @@
<!-- -moz-objectfill, no stroke --> <!-- -moz-objectfill, no stroke -->
<!-- N --> <!-- N -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50" <rect x="100" y="-900" width="800" height="800" stroke-width="50"
stroke="none" fill="-moz-objectFill" glyphchar="N"/> stroke="none" fill="-moz-objectFill" id="glyph48"/>
<!-- O --> <!-- O -->
<rect x="50" y="-950" width="900" height="900" stroke-width="100" <rect x="50" y="-950" width="900" height="900" stroke-width="100"
fill="-moz-objectFill" stroke="none" glyphchar="O"/> fill="-moz-objectFill" stroke="none" id="glyph49"/>
<!-- -moz-objectstroke --> <!-- -moz-objectstroke -->
<!-- P --> <!-- P -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50" <rect x="100" y="-900" width="800" height="800" stroke-width="50"
stroke="-moz-objectStroke" fill="burlywood" glyphchar="P"/> stroke="-moz-objectStroke" fill="burlywood" id="glyph50"/>
<!-- both -moz-objectstroke and -moz-objectfill --> <!-- both -moz-objectstroke and -moz-objectfill -->
<!-- Q --> <!-- Q -->
<rect x="50" y="-950" width="900" height="900" stroke-width="100" <rect x="50" y="-950" width="900" height="900" stroke-width="100"
fill="-moz-objectStroke" stroke="-moz-objectFill" glyphchar="Q"/> fill="-moz-objectStroke" stroke="-moz-objectFill" id="glyph51"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 846 B

After

Width:  |  Height:  |  Size: 842 B

View File

@ -7,19 +7,19 @@
<rect x="100" y="-900" width="800" height="800" stroke-width="50" <rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="-moz-objectFill" stroke="-moz-objectStroke" fill="-moz-objectFill" stroke="-moz-objectStroke"
fill-opacity="-moz-objectFillOpacity" fill-opacity="-moz-objectFillOpacity"
stroke-opacity="-moz-objectStrokeOpacity" glyphchar="R"/> stroke-opacity="-moz-objectStrokeOpacity" id="glyph52"/>
<!-- S --> <!-- S -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50" <rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="-moz-objectFill" stroke="-moz-objectStroke" fill="-moz-objectFill" stroke="-moz-objectStroke"
fill-opacity="-moz-objectStrokeOpacity" fill-opacity="-moz-objectStrokeOpacity"
stroke-opacity="-moz-objectFillOpacity" glyphchar="S"/> stroke-opacity="-moz-objectFillOpacity" id="glyph53"/>
<!-- T --> <!-- T -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50" <rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="-moz-objectStroke" stroke="-moz-objectFill" fill="-moz-objectStroke" stroke="-moz-objectFill"
fill-opacity="-moz-objectFillOpacity" fill-opacity="-moz-objectFillOpacity"
stroke-opacity="-moz-objectStrokeOpacity" glyphchar="T"/> stroke-opacity="-moz-objectStrokeOpacity" id="glyph54"/>
<!-- U --> <!-- U -->
<!-- Test for bug where explicit `inherit' would fail for <!-- Test for bug where explicit `inherit' would fail for
@ -27,23 +27,23 @@
<g style="fill-opacity : -moz-objectStrokeOpacity; stroke-opacity : -moz-objectFillOpacity"> <g style="fill-opacity : -moz-objectStrokeOpacity; stroke-opacity : -moz-objectFillOpacity">
<rect x="100" y="-900" width="800" height="800" stroke-width="50" <rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="-moz-objectStroke" stroke="-moz-objectFill" fill="-moz-objectStroke" stroke="-moz-objectFill"
fill-opacity="inherit" stroke-opacity="inherit" glyphchar="U"/> fill-opacity="inherit" stroke-opacity="inherit" id="glyph55"/>
</g> </g>
<!-- W --> <!-- W -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50" <rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="darkorchid" stroke="goldenrod" fill="darkorchid" stroke="goldenrod"
fill-opacity="-moz-objectFillOpacity" fill-opacity="-moz-objectFillOpacity"
stroke-opacity="-moz-objectStrokeOpacity" glyphchar="W"/> stroke-opacity="-moz-objectStrokeOpacity" id="glyph57"/>
<!-- X --> <!-- X -->
<rect x="100" y="-900" width="800" height="800" stroke-width="50" <rect x="100" y="-900" width="800" height="800" stroke-width="50"
fill="darkorchid" stroke="goldenrod" fill="darkorchid" stroke="goldenrod"
fill-opacity="-moz-objectStrokeOpacity" fill-opacity="-moz-objectStrokeOpacity"
stroke-opacity="-moz-objectFillOpacity" glyphchar="X"/> stroke-opacity="-moz-objectFillOpacity" id="glyph58"/>
<style type="text/css"><![CDATA[ <style type="text/css"><![CDATA[
#yparent { #glyph59 {
fill-opacity : -moz-objectFillOpacity; fill-opacity : -moz-objectFillOpacity;
stroke-opacity : -moz-objectStrokeOpacity; stroke-opacity : -moz-objectStrokeOpacity;
} }
@ -52,7 +52,7 @@
} }
]]></style> ]]></style>
<!-- Y --> <!-- Y -->
<g glyphchar="Y" id="yparent"> <g id="glyph59">
<rect x="100" y="-900" width="800" height="300" stroke="red" stroke-width="50"/> <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" /> <rect x="100" y="-400" width="800" height="300" stroke="red" stroke-width="50" id="ychild" />
</g> </g>

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -6,20 +6,20 @@
<!-- a --> <!-- a -->
<rect x="100" y="-900" width="800" height="800" stroke="powderblue" <rect x="100" y="-900" width="800" height="800" stroke="powderblue"
stroke-width="50" stroke-dashoffset="35" stroke-width="50" stroke-dashoffset="35"
stroke-dasharray="50 50" glyphchar="a" /> stroke-dasharray="50 50" id="glyph67" />
<!-- b --> <!-- b -->
<rect x="100" y="-900" width="800" height="800" stroke="chartreuse" <rect x="100" y="-900" width="800" height="800" stroke="chartreuse"
stroke-width="50" stroke-dashoffset="35" stroke-width="50" stroke-dashoffset="35"
stroke-dasharray="-moz-objectValue" glyphchar="b" /> stroke-dasharray="-moz-objectValue" id="glyph68" />
<!-- c --> <!-- c -->
<rect x="100" y="-900" width="800" height="800" stroke="sienna" <rect x="100" y="-900" width="800" height="800" stroke="sienna"
stroke-width="50" stroke-dasharray="50 50" stroke-width="50" stroke-dasharray="50 50"
stroke-dashoffset="-moz-objectValue" glyphchar="c" /> stroke-dashoffset="-moz-objectValue" id="glyph69" />
<!-- d --> <!-- d -->
<rect x="100" y="-900" width="800" height="800" stroke="olivedrab" <rect x="100" y="-900" width="800" height="800" stroke="olivedrab"
stroke-width="-moz-objectValue" stroke-dasharray="-moz-objectValue" stroke-width="-moz-objectValue" stroke-dasharray="-moz-objectValue"
stroke-dashoffset="-moz-objectValue" glyphchar="d" /> stroke-dashoffset="-moz-objectValue" id="glyph70" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 919 B

After

Width:  |  Height:  |  Size: 915 B

View File

@ -5,8 +5,4 @@
<rect x="20" y="0" width="20" height="20" stroke="none" <rect x="20" y="0" width="20" height="20" stroke="none"
fill="turquoise" /> fill="turquoise" />
</g> </g>
<rect x="10" y="210" width="180" height="180" stroke-width="20"
fill="pink" stroke="hotpink" />
<rect x="20" y="420" width="160" height="160" stroke-width="10"
stroke="black" fill="green" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 452 B

After

Width:  |  Height:  |  Size: 249 B

View File

@ -14,7 +14,7 @@
]]> ]]>
</style> </style>
<!-- <!--
Test that SVG glyphs are being drawn instead of TrueType glyphs Test that SVG glyphs are being drawn instead of TrueType glyphs
Also testing that this does not happen if the Also testing that this does not happen if the
gfx.font_rendering.opentype_svg.enabled preference is set to true. gfx.font_rendering.opentype_svg.enabled preference is set to true.
--> -->
@ -22,12 +22,4 @@
<text x="0" y="200"> <text x="0" y="200">
L L
</text> </text>
<!-- glyphchar -->
<text x="0" y="400">
M
</text>
<!-- glyphchar with UVS selector -->
<text x="0" y="600">
L&#xfe01;
</text>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 723 B

After

Width:  |  Height:  |  Size: 579 B

View File

@ -1,15 +1,19 @@
<svg xmlns="http://www.w3.org/2000/svg"> <svg xmlns="http://www.w3.org/2000/svg">
<!-- M -->
<rect x="10" y="10" width="180" height="180" stroke-width="20"
fill="pink" stroke="hotpink" />
<!-- L --> <!-- L -->
<rect x="220" y="20" width="160" height="160" stroke-width="10" <rect x="20" y="20" width="160" height="160" stroke-width="10"
stroke="black" fill="red" /> stroke="black" fill="red" />
<rect x="220" y="0" width="20" height="20" stroke="none" <rect x="20" y="0" width="20" height="20" stroke="none"
fill="turquoise" /> fill="turquoise" />
<!-- L with UVS --> <!-- L -->
<rect x="370" y="20" width="160" height="160" stroke-width="10" <rect x="170" y="20" width="160" height="160" stroke-width="10"
stroke="black" fill="green" /> stroke="black" fill="red" />
<rect x="170" y="0" width="20" height="20" stroke="none"
fill="turquoise" />
<!-- L -->
<rect x="320" y="20" width="160" height="160" stroke-width="10"
stroke="black" fill="red" />
<rect x="320" y="0" width="20" height="20" stroke="none"
fill="turquoise" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 482 B

After

Width:  |  Height:  |  Size: 633 B

View File

@ -14,10 +14,10 @@
]]> ]]>
</style> </style>
<!-- <!--
Test that we're rendering in the right place in the middle of a Test that we're rendering in the right place in the middle of a
text run text run
--> -->
<text x="0" y="200"> <text x="0" y="200">
MLL&#xfe01; LLL
</text> </text>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 462 B

After

Width:  |  Height:  |  Size: 452 B

View File

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
@font-face { font-family: foo; src: url("resources/two_cats.ttf"); }
body { font-family: foo, sans-serif; font-size: 24px; }
td { padding: 2px 10px }
</style>
</head>
<body>
<table>
<tr><td>&#x1f431;</td><td>ネコ</td><td>cat face</td></tr>
<tr><td>&#x1f63b;</td><td>目がハート(ネコ)</td><td>smiling cat face with heart shaped eyes</td></tr>
</table>
</body>
</html>

View File

@ -1,18 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
@font-face { font-family: foo; src: url("resources/two_cats.ttf"); }
body { font-family: foo, sans-serif; font-size: 24px; }
td { padding: 2px 10px }
</style>
</head>
<body>
<table>
<!-- the Plane-14 variation selector U+E0100 should change U+1F431 to the "heart shaped eyes" cat face -->
<tr><td>&#x1f431;</td><td>ネコ</td><td>cat face</td></tr>
<tr><td>&#x1f431;&#xe0100;</td><td>目がハート(ネコ)</td><td>smiling cat face with heart shaped eyes</td></tr>
</table>
</body>
</html>