mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Update web-platform-tests to revision 589d1d54b73d37f1efde64f75cc408bdd640b44a
This commit is contained in:
parent
8ab389c10c
commit
1c7e2d22cf
122 changed files with 1953 additions and 415 deletions
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Tests that the ascentOverride, descentOverride and lineGapOverride attributes of FontFace work</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-font-loading/#fontface-interface">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#font-metrics-override-desc">
|
||||
<link rel="match" href="fontface-override-descriptors-ref.html">
|
||||
<script>
|
||||
const face = new FontFace(
|
||||
'ahem-overridden',
|
||||
'local("Ahem"), url("/fonts/Ahem.ttf")',
|
||||
{ascentOverride: '100%', descentOverride: '100%', lineGapOverride: '100%'});
|
||||
document.fonts.add(face);
|
||||
|
||||
// Line height is ascent + descent + lineGap = 3em
|
||||
// Baseline is placed at lineGap * 0.5 + ascent = 1.5em below line box top
|
||||
// Since each Ahem 'X' glyph has 0.8em above baseline, the top of each glyph
|
||||
// should be placed at 0.7em below line box top
|
||||
</script>
|
||||
<style>
|
||||
#target {
|
||||
position: absolute;
|
||||
font-family: ahem-overridden;
|
||||
font-size: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="target">
|
||||
XXXXX<br>
|
||||
XXXXX
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue