@font-face { src:local() } reftest

This commit is contained in:
Karl Tomlinson 2009-01-03 16:25:51 +13:00
Родитель 10bdace188
Коммит 7841d2c412
3 изменённых файлов: 85 добавлений и 3 удалений

Просмотреть файл

@ -0,0 +1,22 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>test src: local() reference</title>
<style type="text/css">
body {
font-family: Nimbus Sans L, Helvetica, Arial, Liberation Sans,
serif;
}
</style>
</head>
<body>
<p style="font-weight: normal;">
The quick brown fox jumped over the lazy dog
</p>
<p style="font-weight: bold;">
The quick brown fox jumped over the lazy dog
</p>
</body>
</html>

Просмотреть файл

@ -0,0 +1,58 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>test src: local()</title>
<!--
Most systems are expected to have either Linotype's Helvetica or a
substitute. These are needed for PostScript or PDF support. MS
systems will have Monotype's Arial installed. Systems with
ghostscript will normally have Nimbus Sans L. Linux systems without
ghostscript may have Adobe's bitmap Helvetica for X11 or Ascender /
Red Hat's Liberation Sans.
The result will be compared with fonts chosen through font-family.
Platform aliases (on Windows and Linux) will map family names from
one substitute to another, but similar aliasing does not happen with
face names in local(). Therefore, all Helvetica substitute fonts
are included in the @font-face rules.
Full names are specified for all fonts for MS Windows and Linux, and
PostScript names are included for Mac for all fonts up to
Helvetica, which is expected to be on every Mac.
The generic fallback is chosen to be serif, which is not expected to
be the same as any of the local (sans-serif) faces in the @font-face
rules, so that it makes failure to reference the local faces more
obvious.
-->
<style type="text/css">
@font-face {
font-family: "Local";
src: local(Nimbus Sans L), local(NimbusSansL-Regu),
local(Helvetica),
local(Arial), local(Liberation Sans);
font-weight: 100;
}
@font-face {
font-family: "Local";
src: local(Nimbus Sans L Bold), local(NimbusSansL-Bold),
local(Helvetica Bold), local(Helvetica-Bold),
local(Arial Bold), local(Liberation Sans Bold);
font-weight: normal;
}
body { font-family: Local, serif }
</style>
</head>
<body>
<p style="font-weight: 100">
The quick brown fox jumped over the lazy dog
</p>
<p style="font-weight: normal;">
The quick brown fox jumped over the lazy dog
</p>
</body>
</html>

Просмотреть файл

@ -1,6 +1,6 @@
# Everything here uses HTTP(..) because they use fonts in ../fonts/. We
# can't use file:/// URLs because of cross-directory access restrictions
# on file: URLs.
# Tests using downloaded fonts use HTTP(..) because they use fonts in
# ../fonts/. We can't use file:/// URLs because of cross-directory access
# restrictions on file: URLs.
HTTP(..) != download-1.html download-1-notref.html
HTTP(..) == download-2.html download-2-ref.html
@ -61,3 +61,5 @@ HTTP(..) != media-query-add-1-ref.html media-query-remove-1-ref.html
HTTP(..) == ahem-metrics-1.html ahem-metrics-1-ref.html
HTTP(..) == ex-unit-1.html ex-unit-1-ref.html
HTTP(..) == ex-unit-1-dynamic.html ex-unit-1-ref.html
fails-if(MOZ_WIDGET_TOOLKIT!="gtk2") == local-1.html local-1-ref.html # fails on MS Windows and Mac due to bug 465463