mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
layout: Implement per-glyph font fallback.
This improves numerous pages, for example Wikipedia and Ars Technica. Closes #177.
This commit is contained in:
parent
19b443ecc8
commit
fec43b49bb
9 changed files with 308 additions and 121 deletions
28
tests/ref/per_glyph_font_fallback_ref.html
Normal file
28
tests/ref/per_glyph_font_fallback_ref.html
Normal 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>←</span></section>
|
||||
<section><span class=arrow>→</span>x</section>
|
||||
<section><span class=arrow>→</span>x<span class=arrow>←</span></section>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue