Adjust css-values/ex-unit-001 test to avoid dependency on locally-installed font lookup.
The test here used a face with `src: local(Arial);`, while the reference file used `font-family: Arial, sans-serif`;
but these may not reliably result in the same behavior. The `@font-face` rule looks up a specific *face*,
and if that face is not found, the test will fall back to the browser's default font; but the reference might
get a *different* result if, for example, a fontconfig alias/substitution rule is present that maps Arial to
a different sans-serif than the browser's default.
So instead of trying to use a local font lookup to provide the metrics contrast with Ahem, this patch specifically
loads a second font resource (in both the testcase and reference) to provide consistent behavior.
Differential Revision: https://phabricator.services.mozilla.com/D116452
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1711479
gecko-commit: 43c6edbfc3dac8013830c4737c051cfc00ae5968
gecko-reviewers: emilio
diff --git a/css/css-values/ex-unit-001.html b/css/css-values/ex-unit-001.html
index eff0dbe..b147c1c 100644
--- a/css/css-values/ex-unit-001.html
+++ b/css/css-values/ex-unit-001.html
@@ -16,10 +16,8 @@
@font-face {
font-family: foo;
font-weight: 900;
- /* It doesn't really matter if Arial is not found, as
- long as we fall-back to a font with different metrics
- than Ahem */
- src: local(Arial);
+ /* A font with significantly different ex-height metric than Aham. */
+ src: url('/fonts/noto/noto-sans-v8-latin-regular.woff');
}
div {
diff --git a/css/css-values/reference/ex-unit-001-ref.html b/css/css-values/reference/ex-unit-001-ref.html
index daf375e..33b241f 100644
--- a/css/css-values/reference/ex-unit-001-ref.html
+++ b/css/css-values/reference/ex-unit-001-ref.html
@@ -5,8 +5,13 @@
<meta name="flags" content="ahem">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
+ @font-face {
+ font-family: foo;
+ font-weight: 900;
+ src: url('/fonts/noto/noto-sans-v8-latin-regular.woff');
+ }
div {
- font-family: Arial, sans-serif;
+ font-family: foo, sans-serif;
font-weight: 900;
width: 10ex;
height: 20px;