forked from mirrors/gecko-dev
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
27 lines
715 B
HTML
27 lines
715 B
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<title>CSS Test Reference</title>
|
|
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
|
<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: foo, sans-serif;
|
|
font-weight: 900;
|
|
width: 10ex;
|
|
height: 20px;
|
|
background: blue;
|
|
margin: 20px;
|
|
font-size: 20px;
|
|
}
|
|
</style>
|
|
<p>All lines except the first should be the same length</p>
|
|
<div style="font-family: Ahem; font-weight: normal;"></div>
|
|
<div></div>
|
|
<div></div>
|
|
<div></div>
|