mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 719286 - Test for basic OpenType SVG functionality r=roc
This commit is contained in:
parent
2446d8504c
commit
d7f94d2e0e
5
layout/reftests/text-svgglyphs/reftest.list
Normal file
5
layout/reftests/text-svgglyphs/reftest.list
Normal file
@ -0,0 +1,5 @@
|
||||
pref(gfx.font_rendering.opentype_svg.enabled,false) != svg-glyph-basic.svg svg-glyph-basic-ref.svg
|
||||
pref(gfx.font_rendering.opentype_svg.enabled,true) == svg-glyph-basic.svg svg-glyph-basic-ref.svg
|
||||
pref(gfx.font_rendering.opentype_svg.enabled,false) != svg-glyph-positioning.svg svg-glyph-positioning-ref.svg
|
||||
pref(gfx.font_rendering.opentype_svg.enabled,true) == svg-glyph-positioning.svg svg-glyph-positioning-ref.svg
|
||||
pref(gfx.font_rendering.opentype_svg.enabled,true) == svg-glyph-invalid.html svg-glyph-invalid-ref.html
|
BIN
layout/reftests/text-svgglyphs/resources/nosvg.woff
Normal file
BIN
layout/reftests/text-svgglyphs/resources/nosvg.woff
Normal file
Binary file not shown.
1
layout/reftests/text-svgglyphs/resources/rubbish.txt
Normal file
1
layout/reftests/text-svgglyphs/resources/rubbish.txt
Normal file
@ -0,0 +1 @@
|
||||
This is the text contained in the rubbish.ttf 'SVG ' table. It is obviously not XML, and should thus be ignored.
|
BIN
layout/reftests/text-svgglyphs/resources/rubbish.woff
Normal file
BIN
layout/reftests/text-svgglyphs/resources/rubbish.woff
Normal file
Binary file not shown.
37
layout/reftests/text-svgglyphs/resources/svg-woff.svg
Normal file
37
layout/reftests/text-svgglyphs/resources/svg-woff.svg
Normal file
@ -0,0 +1,37 @@
|
||||
<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︁"/>
|
||||
|
||||
<!-- 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"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
BIN
layout/reftests/text-svgglyphs/resources/svg.woff
Normal file
BIN
layout/reftests/text-svgglyphs/resources/svg.woff
Normal file
Binary file not shown.
12
layout/reftests/text-svgglyphs/svg-glyph-basic-ref.svg
Normal file
12
layout/reftests/text-svgglyphs/svg-glyph-basic-ref.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<g>
|
||||
<rect x="20" y="20" width="160" height="160" stroke-width="10"
|
||||
stroke="black" fill="red" />
|
||||
<rect x="20" y="0" width="20" height="20" stroke="none"
|
||||
fill="turquoise" />
|
||||
</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>
|
After Width: | Height: | Size: 452 B |
33
layout/reftests/text-svgglyphs/svg-glyph-basic.svg
Normal file
33
layout/reftests/text-svgglyphs/svg-glyph-basic.svg
Normal file
@ -0,0 +1,33 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
@font-face {
|
||||
font-family: "Liberation";
|
||||
src:url(resources/svg.woff);
|
||||
}
|
||||
text
|
||||
{
|
||||
font-family: Liberation;
|
||||
font-size: 200px;
|
||||
stroke: black;
|
||||
}
|
||||
]]>
|
||||
</style>
|
||||
<!--
|
||||
Test that SVG glyphs are being drawn instead of TrueType glyphs
|
||||
Also testing that this does not happen if the
|
||||
gfx.font_rendering.opentype_svg.enabled preference is set to true.
|
||||
-->
|
||||
<!-- glyphid -->
|
||||
<text x="0" y="200">
|
||||
L
|
||||
</text>
|
||||
<!-- glyphchar -->
|
||||
<text x="0" y="400">
|
||||
M
|
||||
</text>
|
||||
<!-- glyphchar with UVS selector -->
|
||||
<text x="0" y="600">
|
||||
L︁
|
||||
</text>
|
||||
</svg>
|
After Width: | Height: | Size: 723 B |
18
layout/reftests/text-svgglyphs/svg-glyph-invalid-ref.html
Normal file
18
layout/reftests/text-svgglyphs/svg-glyph-invalid-ref.html
Normal file
@ -0,0 +1,18 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Reference for test that invalid XML in the 'SVG ' table is rejected</title>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family : 'Liberation';
|
||||
src : url(resources/nosvg.woff);
|
||||
}
|
||||
body {
|
||||
font-family : 'Liberation';
|
||||
font-size : 200px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
LML︁
|
||||
</body>
|
||||
</html>
|
23
layout/reftests/text-svgglyphs/svg-glyph-invalid.html
Normal file
23
layout/reftests/text-svgglyphs/svg-glyph-invalid.html
Normal file
@ -0,0 +1,23 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Test that invalid XML in the 'SVG ' table is rejected</title>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family : 'Liberation';
|
||||
src : url(resources/rubbish.woff);
|
||||
}
|
||||
body {
|
||||
font-family : 'Liberation';
|
||||
font-size : 200px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<!--
|
||||
The font file resources/rubbish.woff contains an SVG table which
|
||||
does not contain valid XML. This test makes sure it falls back
|
||||
on rendering the text using the truetype outlines.
|
||||
-->
|
||||
<body>
|
||||
LML︁
|
||||
</body>
|
||||
</html>
|
15
layout/reftests/text-svgglyphs/svg-glyph-positioning-ref.svg
Normal file
15
layout/reftests/text-svgglyphs/svg-glyph-positioning-ref.svg
Normal file
@ -0,0 +1,15 @@
|
||||
<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 -->
|
||||
<rect x="220" y="20" width="160" height="160" stroke-width="10"
|
||||
stroke="black" fill="red" />
|
||||
<rect x="220" y="0" width="20" height="20" stroke="none"
|
||||
fill="turquoise" />
|
||||
|
||||
<!-- L with UVS -->
|
||||
<rect x="370" y="20" width="160" height="160" stroke-width="10"
|
||||
stroke="black" fill="green" />
|
||||
</svg>
|
After Width: | Height: | Size: 482 B |
23
layout/reftests/text-svgglyphs/svg-glyph-positioning.svg
Normal file
23
layout/reftests/text-svgglyphs/svg-glyph-positioning.svg
Normal file
@ -0,0 +1,23 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
@font-face {
|
||||
font-family: "Liberation";
|
||||
src:url(resources/svg.woff);
|
||||
}
|
||||
text
|
||||
{
|
||||
font-family: Liberation;
|
||||
font-size: 200px;
|
||||
stroke: black;
|
||||
}
|
||||
]]>
|
||||
</style>
|
||||
<!--
|
||||
Test that we're rendering in the right place in the middle of a
|
||||
text run
|
||||
-->
|
||||
<text x="0" y="200">
|
||||
MLL︁
|
||||
</text>
|
||||
</svg>
|
After Width: | Height: | Size: 462 B |
Loading…
Reference in New Issue
Block a user