mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
bug 511339 followup - add reftests for font feature control. r=jdaggett a=tests-only
This commit is contained in:
parent
25f0b155ca
commit
34e5652416
18
layout/reftests/font-features/font-features-hlig-2.html
Normal file
18
layout/reftests/font-features/font-features-hlig-2.html
Normal file
@ -0,0 +1,18 @@
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: libertine;
|
||||
src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
|
||||
-moz-font-feature-settings: "hlig=1";
|
||||
}
|
||||
body {
|
||||
font-family: libertine, sans-serif;
|
||||
font-size: 200%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body lang="en">
|
||||
fastest firefox
|
||||
</body>
|
||||
</html>
|
19
layout/reftests/font-features/font-features-hlig-3.html
Normal file
19
layout/reftests/font-features/font-features-hlig-3.html
Normal file
@ -0,0 +1,19 @@
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: libertine;
|
||||
src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
|
||||
-moz-font-feature-settings: "hlig=1";
|
||||
}
|
||||
body {
|
||||
font-family: libertine, sans-serif;
|
||||
font-size: 200%;
|
||||
-moz-font-feature-settings: "hlig=0,liga=0";
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body lang="en">
|
||||
fastest firefox
|
||||
</body>
|
||||
</html>
|
18
layout/reftests/font-features/font-features-hlig.html
Normal file
18
layout/reftests/font-features/font-features-hlig.html
Normal file
@ -0,0 +1,18 @@
|
||||
<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: 200%;
|
||||
-moz-font-feature-settings: "hlig=1";
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body lang="en">
|
||||
fastest firefox
|
||||
</body>
|
||||
</html>
|
18
layout/reftests/font-features/font-features-noliga.html
Normal file
18
layout/reftests/font-features/font-features-noliga.html
Normal file
@ -0,0 +1,18 @@
|
||||
<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: 200%;
|
||||
-moz-font-feature-settings: "liga=0";
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body lang="en">
|
||||
fastest firefox
|
||||
</body>
|
||||
</html>
|
17
layout/reftests/font-features/font-features-ref.html
Normal file
17
layout/reftests/font-features/font-features-ref.html
Normal file
@ -0,0 +1,17 @@
|
||||
<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: 200%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body lang="en">
|
||||
fastest firefox
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,18 @@
|
||||
<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: 200%;
|
||||
-moz-font-language-override: "TRK";
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body lang="en">
|
||||
fastest firefox
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,18 @@
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: libertine;
|
||||
src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
|
||||
-moz-font-language-override: "TRK";
|
||||
}
|
||||
body {
|
||||
font-family: libertine, sans-serif;
|
||||
font-size: 200%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body lang="en">
|
||||
fastest firefox
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,18 @@
|
||||
<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: 200%;
|
||||
-moz-font-language-override: "ENG";
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body lang="tr">
|
||||
fastest firefox
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,18 @@
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: libertine;
|
||||
src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
|
||||
-moz-font-language-override: "ENG";
|
||||
}
|
||||
body {
|
||||
font-family: libertine, sans-serif;
|
||||
font-size: 200%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body lang="tr">
|
||||
fastest firefox
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,19 @@
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: libertine;
|
||||
src: url(../fonts/LinLibertine_Re-4.7.5.woff) format("woff");
|
||||
-moz-font-language-override: "ENG";
|
||||
}
|
||||
body {
|
||||
font-family: libertine, sans-serif;
|
||||
font-size: 200%;
|
||||
-moz-font-language-override: "TRK";
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body lang="de">
|
||||
fastest firefox
|
||||
</body>
|
||||
</html>
|
17
layout/reftests/font-features/font-features-turkish-ref.html
Normal file
17
layout/reftests/font-features/font-features-turkish-ref.html
Normal file
@ -0,0 +1,17 @@
|
||||
<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: 200%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body lang="en">
|
||||
fastest f‌irefox
|
||||
</body>
|
||||
</html>
|
17
layout/reftests/font-features/font-features-turkish.html
Normal file
17
layout/reftests/font-features/font-features-turkish.html
Normal file
@ -0,0 +1,17 @@
|
||||
<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: 200%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body lang="tr">
|
||||
fastest firefox
|
||||
</body>
|
||||
</html>
|
45
layout/reftests/font-features/reftest.list
Normal file
45
layout/reftests/font-features/reftest.list
Normal file
@ -0,0 +1,45 @@
|
||||
# Tests for opentype font feature control (bug 511339)
|
||||
#
|
||||
# These rely on the Linux Libertine font (loaded via @font-face)
|
||||
# to ensure that features are present.
|
||||
|
||||
# Feature support is currently enabled only on Mac OS X by default
|
||||
|
||||
# check that Turkish language causes a change in rendering (no fi ligature)
|
||||
# (also works via Pango)
|
||||
fails-if(MOZ_WIDGET_TOOLKIT=="windows") HTTP(..) != font-features-turkish.html font-features-ref.html
|
||||
|
||||
# check that disabling ligatures causes a change
|
||||
fails-if(MOZ_WIDGET_TOOLKIT!="cocoa") HTTP(..) != font-features-noliga.html font-features-ref.html
|
||||
|
||||
# check that enabling optional ligatures causes a change
|
||||
fails-if(MOZ_WIDGET_TOOLKIT!="cocoa") HTTP(..) != font-features-hlig.html font-features-ref.html
|
||||
|
||||
# compare Turkish rendering with reference using ZWNJ to break the ligature
|
||||
# (also works via Pango)
|
||||
fails-if(MOZ_WIDGET_TOOLKIT=="windows") HTTP(..) == font-features-turkish.html font-features-turkish-ref.html
|
||||
|
||||
# compare Turkish rendering with explicitly disabled ligatures
|
||||
# (fails on Linux because Pango recognizes the Turkish lang but not the feature setting)
|
||||
fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") HTTP(..) == font-features-turkish.html font-features-noliga.html
|
||||
|
||||
# The following should pass even if feature support isn't available,
|
||||
# because both testcase and reference will have the default rendering,
|
||||
# though they're not really meaningful unless the tests above passed already.
|
||||
|
||||
# compare feature specified within @font-face to same feature in style rule
|
||||
HTTP(..) == font-features-hlig-2.html font-features-hlig.html
|
||||
|
||||
# check that feature in style rule overrides @font-face
|
||||
HTTP(..) == font-features-hlig-3.html font-features-noliga.html
|
||||
|
||||
# compare -moz-font-language-override rendering to lang-tagged rendering
|
||||
# these fail on Linux because the Pango backend recognizes lang=tr but not -moz-font-language-override
|
||||
fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") HTTP(..) == font-features-turkish-override-1.html font-features-turkish.html
|
||||
fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") HTTP(..) == font-features-turkish-override-2.html font-features-turkish.html
|
||||
|
||||
# check use of -moz-font-language-override to override explicit lang tag
|
||||
fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") HTTP(..) == font-features-turkish-override-3.html font-features-ref.html
|
||||
fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") HTTP(..) == font-features-turkish-override-4.html font-features-ref.html
|
||||
fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") HTTP(..) == font-features-turkish-override-5.html font-features-turkish.html
|
||||
|
BIN
layout/reftests/fonts/LinLibertine_Re-4.7.5.woff
Normal file
BIN
layout/reftests/fonts/LinLibertine_Re-4.7.5.woff
Normal file
Binary file not shown.
@ -102,6 +102,9 @@ include floats/reftest.list
|
||||
# font-face
|
||||
include font-face/reftest.list
|
||||
|
||||
# font features (opentype)
|
||||
include font-features/reftest.list
|
||||
|
||||
# font matching
|
||||
include font-matching/reftest.list
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user