layout: Implement per-glyph font fallback.

This improves numerous pages, for example Wikipedia and Ars Technica.

Closes #177.
This commit is contained in:
Patrick Walton 2015-04-07 18:43:18 -07:00
parent 19b443ecc8
commit fec43b49bb
9 changed files with 308 additions and 121 deletions

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html>
<head>
<!-- Tests that font fallback occurs on a per-glyph basis. -->
<style>
@font-face {
font-family: 'ahem';
src: url(fonts/ahem/ahem.ttf);
}
body {
font-family: Ahem, sans-serif;
font-size: 24px;
line-height: 24px;
}
.arrow {
font-family: sans-serif;
}
</style>
</head>
<body>
<section>x<span class=arrow>&larr;</span></section>
<section><span class=arrow>&rarr;</span>x</section>
<section><span class=arrow>&rarr;</span>x<span class=arrow>&larr;</span></section>
</body>
</html>