mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 549861. Reftests of font-variant-alternates. r=jkew
This commit is contained in:
parent
6758cb5e04
commit
35a0809475
27
layout/reftests/font-features/alternates-order-ref.html
Normal file
27
layout/reftests/font-features/alternates-order-ref.html
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<style type="text/css">
|
||||||
|
@font-face {
|
||||||
|
font-family: libertine;
|
||||||
|
src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-family: libertine, sans-serif;
|
||||||
|
font-size: 800%;
|
||||||
|
line-height: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div { margin: 0 20px; }
|
||||||
|
span {
|
||||||
|
-moz-font-feature-settings: "ss05"; /* crossed W */
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body lang="en">
|
||||||
|
<div><span id="test1">W</span> <span id="test2">W</span> <span id="test3">W</span></div>
|
||||||
|
<div><span id="test4">W</span> <span id="test5">W</span> <span id="test6">W</span></div>
|
||||||
|
<div><span id="test7">W</span> <span id="test8">W</span> <span id="test9">W</span></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
116
layout/reftests/font-features/alternates-order.html
Normal file
116
layout/reftests/font-features/alternates-order.html
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<style type="text/css">
|
||||||
|
@font-face {
|
||||||
|
font-family: libertine;
|
||||||
|
src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: fontA;
|
||||||
|
src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
|
||||||
|
-moz-font-feature-settings: "ss05" on;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: fontB;
|
||||||
|
src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
|
||||||
|
-moz-font-feature-settings: "ss05" off;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-feature-values libertine {
|
||||||
|
@styleset {
|
||||||
|
crossed-doubleu: 5;
|
||||||
|
somethingElse: 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-feature-values fontA {
|
||||||
|
@styleset { aLtW: 5; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-feature-values fontB {
|
||||||
|
@styleset { crossedW: 5; several: 1 3 5; }
|
||||||
|
@styleset { altW: 4; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-feature-values fontB {
|
||||||
|
@styleset {
|
||||||
|
AlTw: 5;
|
||||||
|
defined-for-fontB: 5;
|
||||||
|
scriptJ: 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: libertine, sans-serif;
|
||||||
|
font-size: 800%;
|
||||||
|
line-height: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -moz-font-feature-settings: "ss05"; crossed W */
|
||||||
|
|
||||||
|
div { margin: 0 20px; }
|
||||||
|
|
||||||
|
#test1 {
|
||||||
|
font-variant-alternates: styleset(crossed-doubleu);
|
||||||
|
}
|
||||||
|
|
||||||
|
#test2 {
|
||||||
|
/* testing case-insensitivity of styleset name */
|
||||||
|
font-family: fontB;
|
||||||
|
font-variant-alternates: styleset(altW);
|
||||||
|
}
|
||||||
|
|
||||||
|
#test3 {
|
||||||
|
/* testing case-insensitivity of styleset name */
|
||||||
|
font-family: fontB;
|
||||||
|
font-variant-alternates: styleset(ALTW);
|
||||||
|
}
|
||||||
|
|
||||||
|
#test4 {
|
||||||
|
/* testing escapes in styleset name */
|
||||||
|
font-family: fontB;
|
||||||
|
font-variant-alternates: styleset(\41 ltW);
|
||||||
|
}
|
||||||
|
|
||||||
|
#test5 {
|
||||||
|
/* testing font-specificity of feature value rule */
|
||||||
|
font-family: fontA;
|
||||||
|
font-variant-alternates: styleset(defined-for-fontB);
|
||||||
|
}
|
||||||
|
|
||||||
|
#test6 {
|
||||||
|
/* testing one feature doesn't affect another */
|
||||||
|
font-variant-alternates: styleset(somethingElse);
|
||||||
|
-moz-font-feature-settings: "ss05" on;
|
||||||
|
}
|
||||||
|
|
||||||
|
#test7 {
|
||||||
|
/* testing font-specificity of feature value rule */
|
||||||
|
font-family: fontA;
|
||||||
|
font-variant-alternates: styleset(scriptJ);
|
||||||
|
-moz-font-feature-settings: "ss06";
|
||||||
|
}
|
||||||
|
|
||||||
|
#test8 {
|
||||||
|
/* testing that an undefined value doesn't affect the results */
|
||||||
|
font-family: fontB;
|
||||||
|
font-variant-alternates: styleset(scriptJ, somethingUndefined, defined-for-fontB);
|
||||||
|
}
|
||||||
|
|
||||||
|
#test9 {
|
||||||
|
/* testing matching of font name with escape */
|
||||||
|
font-family: font\62 ;
|
||||||
|
font-variant-alternates: styleset(defined-for-fontB);
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body lang="en">
|
||||||
|
<div><span id="test1">W</span> <span id="test2">W</span> <span id="test3">W</span></div>
|
||||||
|
<div><span id="test4">W</span> <span id="test5">W</span> <span id="test6">W</span></div>
|
||||||
|
<div><span id="test7">W</span> <span id="test8">W</span> <span id="test9">W</span></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
71
layout/reftests/font-features/annotations-ref.html
Normal file
71
layout/reftests/font-features/annotations-ref.html
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Annotations test</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 20px;
|
||||||
|
font-size: 800%;
|
||||||
|
font-family: Hiragino Maru Gothic ProN, Meiryo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* for platforms without these fonts the default glyphs will show */
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: testMeiryo-circled;
|
||||||
|
src: local(Meiryo);
|
||||||
|
-moz-font-feature-settings: "nalt" 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: testMeiryo-black-circled;
|
||||||
|
src: local(Meiryo);
|
||||||
|
-moz-font-feature-settings: "nalt" 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: testMeiryo-rounded-box;
|
||||||
|
src: local(Meiryo);
|
||||||
|
-moz-font-feature-settings: "nalt" 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: testHiraginoMaru-circled;
|
||||||
|
src: local(HiraMaruProN-W4), local(Hiragino Maru Gothic ProN W4);
|
||||||
|
-moz-font-feature-settings: "nalt" 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: testHiraginoMaru-black-circled;
|
||||||
|
src: local(HiraMaruProN-W4), local(Hiragino Maru Gothic ProN W4);
|
||||||
|
-moz-font-feature-settings: "nalt" 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: testHiraginoMaru-rounded-box;
|
||||||
|
src: local(HiraMaruProN-W4), local(Hiragino Maru Gothic ProN W4);
|
||||||
|
-moz-font-feature-settings: "nalt" 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
#test1 {
|
||||||
|
font-family: testHiraginoMaru-circled, testMeiryo-circled;
|
||||||
|
}
|
||||||
|
|
||||||
|
#test2 {
|
||||||
|
font-family: testHiraginoMaru-black-circled, testMeiryo-black-circled;
|
||||||
|
}
|
||||||
|
|
||||||
|
#test3 {
|
||||||
|
font-family: testHiraginoMaru-rounded-box, testMeiryo-rounded-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div><span id="test1">1</span> <span id="test2">2</span> <span id="test3">3</span></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
51
layout/reftests/font-features/annotations.html
Normal file
51
layout/reftests/font-features/annotations.html
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Annotations test</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 20px;
|
||||||
|
font-size: 800%;
|
||||||
|
font-family: Hiragino Maru Gothic ProN, Meiryo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* for platforms without these fonts the default glyphs will show */
|
||||||
|
|
||||||
|
@font-feature-values Hiragino Maru Gothic ProN {
|
||||||
|
@annotation { circled: 1; }
|
||||||
|
@annotation { black-circled: 4; }
|
||||||
|
@annotation { black-box: 8; }
|
||||||
|
@annotation { black-rounded-box: 10; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-feature-values Meiryo {
|
||||||
|
@annotation {
|
||||||
|
circled: 4;
|
||||||
|
black-circled: 5;
|
||||||
|
black-box: 7;
|
||||||
|
black-rounded-box: 9;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#test1 {
|
||||||
|
font-variant-alternates: annotation(circled);
|
||||||
|
}
|
||||||
|
|
||||||
|
#test2 {
|
||||||
|
font-variant-alternates: annotation(black-circled);
|
||||||
|
}
|
||||||
|
|
||||||
|
#test3 {
|
||||||
|
font-variant-alternates: annotation(black-rounded-box);
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div><span id="test1">1</span> <span id="test2">2</span> <span id="test3">3</span></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,20 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>font-variant-alternates test</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<script type="text/javascript" src="../fonts/gsubtest/gsubtest-features.js"></script>
|
||||||
|
<script type="text/javascript" src="font-variant-features.js"></script>
|
||||||
|
<link rel="stylesheet" href="font-variant-features.css" type="text/css"/>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="content"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
document.getElementById("content").appendChild(createFeatureTestTable(gPropertyData, "font-variant-alternates", true, false));
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
20
layout/reftests/font-features/font-variant-alternates.html
Normal file
20
layout/reftests/font-features/font-variant-alternates.html
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<title>font-variant-alternates test</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<script type="text/javascript" src="../fonts/gsubtest/gsubtest-features.js"></script>
|
||||||
|
<script type="text/javascript" src="font-variant-features.js"></script>
|
||||||
|
<link rel="stylesheet" href="font-variant-features.css" type="text/css"/>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="content"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
document.getElementById("content").appendChild(createFeatureTestTable(gPropertyData, "font-variant-alternates", false, false));
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -19,3 +19,45 @@ td.features {
|
|||||||
.invalid {
|
.invalid {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@font-feature-values gsub-test {
|
||||||
|
@styleset { ok-alt-a: 1 3 5; ok-alt-b: 19; }
|
||||||
|
@character-variant { ok-1: 78 2; }
|
||||||
|
@character-variant { ok-3: 23; }
|
||||||
|
@character-variant { not-good: 0 2; }
|
||||||
|
@annotation { ok-4: 1; }
|
||||||
|
@annotation { bogus-font-doesnt-support: 23; }
|
||||||
|
@annotation { circled: 1; }
|
||||||
|
@character-variant { multi-def: 4; }
|
||||||
|
@annotation { multi-def: 3; }
|
||||||
|
@styleset { multi-def2: 3 4 5; }
|
||||||
|
@styleset { MULTI-def2: 2 6; }
|
||||||
|
@styleset { out-of-bounds1: 0; out-of-bounds2: 100; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-feature-values bogus-family {
|
||||||
|
@styleset { bogus: 3 4 7; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-feature-values GSUB-tEsT {
|
||||||
|
@styleset { mixed-case: 3 4 7; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-feature-values gSuB-tEsT {
|
||||||
|
@styleset { 3blah: 1 3; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-feature-values gSuB-tEsT {
|
||||||
|
@styleset { moxie: 14; }
|
||||||
|
@styleset { 3blah: 1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-feature-values gSUB-TeST {
|
||||||
|
@styleset { moxie2: 14; }
|
||||||
|
@bongo { blah: 1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-feature-values gSUB-TEst {
|
||||||
|
@bongo { blah2: 1; }
|
||||||
|
@styleset { moxie3: 14; }
|
||||||
|
}
|
||||||
|
@ -56,9 +56,16 @@ HTTP(..) == font-features-order-3.html font-features-noliga.html
|
|||||||
pref(layout.css.font-features.enabled,true) HTTP(..) == font-features-order-4.html font-features-noliga.html
|
pref(layout.css.font-features.enabled,true) HTTP(..) == font-features-order-4.html font-features-noliga.html
|
||||||
pref(layout.css.font-features.enabled,true) HTTP(..) == font-features-order-5.html font-features-hlig.html
|
pref(layout.css.font-features.enabled,true) HTTP(..) == font-features-order-5.html font-features-hlig.html
|
||||||
|
|
||||||
|
# check priority involving feature settings and font-variant-alternates
|
||||||
|
pref(layout.css.font-features.enabled,true) HTTP(..) == alternates-order.html alternates-order-ref.html
|
||||||
|
|
||||||
|
# check that font-specific values line up with @font-face feature settings
|
||||||
|
pref(layout.css.font-features.enabled,true) HTTP(..) == annotations.html annotations-ref.html
|
||||||
|
|
||||||
# font-variant subproperties
|
# font-variant subproperties
|
||||||
# test for specific features being on and others off, based on prop values
|
# test for specific features being on and others off, based on prop values
|
||||||
# (debug problems with font-variant-debug.html which displays all props)
|
# (debug problems with font-variant-debug.html which displays all props)
|
||||||
|
pref(layout.css.font-features.enabled,true) HTTP(..) == font-variant-alternates.html font-variant-alternates-ref.html
|
||||||
pref(layout.css.font-features.enabled,true) HTTP(..) == font-variant-caps.html font-variant-caps-ref.html
|
pref(layout.css.font-features.enabled,true) HTTP(..) == font-variant-caps.html font-variant-caps-ref.html
|
||||||
pref(layout.css.font-features.enabled,true) HTTP(..) == font-variant-east-asian.html font-variant-east-asian-ref.html
|
pref(layout.css.font-features.enabled,true) HTTP(..) == font-variant-east-asian.html font-variant-east-asian-ref.html
|
||||||
pref(layout.css.font-features.enabled,true) HTTP(..) == font-variant-ligatures.html font-variant-ligatures-ref.html
|
pref(layout.css.font-features.enabled,true) HTTP(..) == font-variant-ligatures.html font-variant-ligatures-ref.html
|
||||||
|
Loading…
Reference in New Issue
Block a user