mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Add ahem test font for ref tests to use. Add ref test for line-height using ahem as web font.
This commit is contained in:
parent
87bfef832a
commit
f287340af2
6 changed files with 116 additions and 0 deletions
|
@ -90,3 +90,4 @@ flaky_cpu == linebreak_simple_a.html linebreak_simple_b.html
|
||||||
== table_auto_width.html table_auto_width_ref.html
|
== table_auto_width.html table_auto_width_ref.html
|
||||||
== inline_whitespace_b.html inline_whitespace_ref.html
|
== inline_whitespace_b.html inline_whitespace_ref.html
|
||||||
== inline_whitespace_a.html inline_whitespace_ref.html
|
== inline_whitespace_a.html inline_whitespace_ref.html
|
||||||
|
== line_height_a.html line_height_ref.html
|
||||||
|
|
36
src/test/ref/fonts/ahem/COPYING
Normal file
36
src/test/ref/fonts/ahem/COPYING
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
The Ahem font in this directory belongs to the public domain. In
|
||||||
|
jurisdictions that do not recognize public domain ownership of these
|
||||||
|
files, the following Creative Commons Zero declaration applies:
|
||||||
|
|
||||||
|
<http://labs.creativecommons.org/licenses/zero-waive/1.0/us/legalcode>
|
||||||
|
|
||||||
|
which is quoted below:
|
||||||
|
|
||||||
|
The person who has associated a work with this document (the "Work")
|
||||||
|
affirms that he or she (the "Affirmer") is the/an author or owner of
|
||||||
|
the Work. The Work may be any work of authorship, including a
|
||||||
|
database.
|
||||||
|
|
||||||
|
The Affirmer hereby fully, permanently and irrevocably waives and
|
||||||
|
relinquishes all of her or his copyright and related or neighboring
|
||||||
|
legal rights in the Work available under any federal or state law,
|
||||||
|
treaty or contract, including but not limited to moral rights,
|
||||||
|
publicity and privacy rights, rights protecting against unfair
|
||||||
|
competition and any rights protecting the extraction, dissemination
|
||||||
|
and reuse of data, whether such rights are present or future, vested
|
||||||
|
or contingent (the "Waiver"). The Affirmer makes the Waiver for the
|
||||||
|
benefit of the public at large and to the detriment of the Affirmer's
|
||||||
|
heirs or successors.
|
||||||
|
|
||||||
|
The Affirmer understands and intends that the Waiver has the effect
|
||||||
|
of eliminating and entirely removing from the Affirmer's control all
|
||||||
|
the copyright and related or neighboring legal rights previously held
|
||||||
|
by the Affirmer in the Work, to that extent making the Work freely
|
||||||
|
available to the public for any and all uses and purposes without
|
||||||
|
restriction of any kind, including commercial use and uses in media
|
||||||
|
and formats or by methods that have not yet been invented or
|
||||||
|
conceived. Should the Waiver for any reason be judged legally
|
||||||
|
ineffective in any jurisdiction, the Affirmer hereby grants a free,
|
||||||
|
full, permanent, irrevocable, nonexclusive and worldwide license for
|
||||||
|
all her or his copyright and related or neighboring legal rights in
|
||||||
|
the Work.
|
30
src/test/ref/fonts/ahem/README
Normal file
30
src/test/ref/fonts/ahem/README
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
The Ahem font was developed by Todd Fahrner to help test writers
|
||||||
|
develop predictable tests. The font's em square is exactly square.
|
||||||
|
Its ascent and descent is exactly the size of the em square. This
|
||||||
|
means that the font's extent is exactly the same as its line-height,
|
||||||
|
meaning that it can be exactly aligned with padding, borders, margins,
|
||||||
|
and so forth.
|
||||||
|
|
||||||
|
The font's alphabetic baseline is 0.2em above its bottom, and 0.8em
|
||||||
|
below its top. The font has an x-height of 0.8em.
|
||||||
|
|
||||||
|
The font has four glyphs:
|
||||||
|
|
||||||
|
'X' U+0058 A square exactly 1em in height and width.
|
||||||
|
|
||||||
|
'p' U+0070 A rectangle exactly 0.2em high, 1em wide, and aligned so
|
||||||
|
that its top is flush with the baseline.
|
||||||
|
|
||||||
|
'É' U+00C9 A rectangle exactly 0.8em high, 1em wide, and aligned so
|
||||||
|
that its bottom is flush with the baseline.
|
||||||
|
|
||||||
|
' ' U+0020 A transparent space exactly 1em high and wide.
|
||||||
|
|
||||||
|
Most other US-ASCII characters in the font have the same glyph as X.
|
||||||
|
|
||||||
|
The Ahem font belongs to the public domain as described in COPYING.
|
||||||
|
|
||||||
|
Acknowledgements: The font was originally created by Todd Fahrner in
|
||||||
|
the late 90s, and was updated by Paul Nelson in the mid 2000s. The
|
||||||
|
changes were the introduction of x-height information to the OS/2
|
||||||
|
table and the addition of the space and non-breaking space glyphs.
|
BIN
src/test/ref/fonts/ahem/ahem.ttf
Normal file
BIN
src/test/ref/fonts/ahem/ahem.ttf
Normal file
Binary file not shown.
24
src/test/ref/line_height_a.html
Normal file
24
src/test/ref/line_height_a.html
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<style>
|
||||||
|
@font-face {
|
||||||
|
font-family: 'ahem';
|
||||||
|
src: url(fonts/ahem/ahem.ttf);
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
color: yellow;
|
||||||
|
font-family: ahem;
|
||||||
|
font-size: 128px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<span>X</span>
|
||||||
|
</body>
|
||||||
|
</html>
|
25
src/test/ref/line_height_ref.html
Normal file
25
src/test/ref/line_height_ref.html
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<style>
|
||||||
|
@font-face {
|
||||||
|
font-family: 'ahem';
|
||||||
|
src: url(fonts/ahem/ahem.ttf);
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
color: yellow;
|
||||||
|
font-family: ahem;
|
||||||
|
font-size: 128px;
|
||||||
|
line-height: 1.0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<span>X</span>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Add table
Add a link
Reference in a new issue