diff --git a/layout/reftests/font-features/font-features-hlig-2.html b/layout/reftests/font-features/font-features-hlig-2.html new file mode 100644 index 00000000000..2f6ed4bb1f3 --- /dev/null +++ b/layout/reftests/font-features/font-features-hlig-2.html @@ -0,0 +1,18 @@ + +
+ + + +fastest firefox + + diff --git a/layout/reftests/font-features/font-features-hlig-3.html b/layout/reftests/font-features/font-features-hlig-3.html new file mode 100644 index 00000000000..3d8b8a750e5 --- /dev/null +++ b/layout/reftests/font-features/font-features-hlig-3.html @@ -0,0 +1,19 @@ + + + + + +fastest firefox + + diff --git a/layout/reftests/font-features/font-features-hlig.html b/layout/reftests/font-features/font-features-hlig.html new file mode 100644 index 00000000000..f9363601f21 --- /dev/null +++ b/layout/reftests/font-features/font-features-hlig.html @@ -0,0 +1,18 @@ + + + + + +fastest firefox + + diff --git a/layout/reftests/font-features/font-features-noliga.html b/layout/reftests/font-features/font-features-noliga.html new file mode 100644 index 00000000000..be909346f5d --- /dev/null +++ b/layout/reftests/font-features/font-features-noliga.html @@ -0,0 +1,18 @@ + + + + + +fastest firefox + + diff --git a/layout/reftests/font-features/font-features-ref.html b/layout/reftests/font-features/font-features-ref.html new file mode 100644 index 00000000000..02456b33e4a --- /dev/null +++ b/layout/reftests/font-features/font-features-ref.html @@ -0,0 +1,17 @@ + + + + + +fastest firefox + + diff --git a/layout/reftests/font-features/font-features-turkish-override-1.html b/layout/reftests/font-features/font-features-turkish-override-1.html new file mode 100644 index 00000000000..e1e73119133 --- /dev/null +++ b/layout/reftests/font-features/font-features-turkish-override-1.html @@ -0,0 +1,18 @@ + + + + + +fastest firefox + + diff --git a/layout/reftests/font-features/font-features-turkish-override-2.html b/layout/reftests/font-features/font-features-turkish-override-2.html new file mode 100644 index 00000000000..b4b352b4a10 --- /dev/null +++ b/layout/reftests/font-features/font-features-turkish-override-2.html @@ -0,0 +1,18 @@ + + + + + +fastest firefox + + diff --git a/layout/reftests/font-features/font-features-turkish-override-3.html b/layout/reftests/font-features/font-features-turkish-override-3.html new file mode 100644 index 00000000000..72614376444 --- /dev/null +++ b/layout/reftests/font-features/font-features-turkish-override-3.html @@ -0,0 +1,18 @@ + + + + + +fastest firefox + + diff --git a/layout/reftests/font-features/font-features-turkish-override-4.html b/layout/reftests/font-features/font-features-turkish-override-4.html new file mode 100644 index 00000000000..e67eb4a59ac --- /dev/null +++ b/layout/reftests/font-features/font-features-turkish-override-4.html @@ -0,0 +1,18 @@ + + + + + +fastest firefox + + diff --git a/layout/reftests/font-features/font-features-turkish-override-5.html b/layout/reftests/font-features/font-features-turkish-override-5.html new file mode 100644 index 00000000000..8a7fcbdc636 --- /dev/null +++ b/layout/reftests/font-features/font-features-turkish-override-5.html @@ -0,0 +1,19 @@ + + + + + +fastest firefox + + diff --git a/layout/reftests/font-features/font-features-turkish-ref.html b/layout/reftests/font-features/font-features-turkish-ref.html new file mode 100644 index 00000000000..7715f567378 --- /dev/null +++ b/layout/reftests/font-features/font-features-turkish-ref.html @@ -0,0 +1,17 @@ + + + + + +fastest firefox + + diff --git a/layout/reftests/font-features/font-features-turkish.html b/layout/reftests/font-features/font-features-turkish.html new file mode 100644 index 00000000000..c1636eda7f6 --- /dev/null +++ b/layout/reftests/font-features/font-features-turkish.html @@ -0,0 +1,17 @@ + + + + + +fastest firefox + + diff --git a/layout/reftests/font-features/reftest.list b/layout/reftests/font-features/reftest.list new file mode 100644 index 00000000000..02022ae598a --- /dev/null +++ b/layout/reftests/font-features/reftest.list @@ -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 + diff --git a/layout/reftests/fonts/LinLibertine_Re-4.7.5.woff b/layout/reftests/fonts/LinLibertine_Re-4.7.5.woff new file mode 100644 index 00000000000..c953a546f0a Binary files /dev/null and b/layout/reftests/fonts/LinLibertine_Re-4.7.5.woff differ diff --git a/layout/reftests/reftest.list b/layout/reftests/reftest.list index 066cc942c2c..1cb9aa65fd5 100644 --- a/layout/reftests/reftest.list +++ b/layout/reftests/reftest.list @@ -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