wpt / css / css-fonts / line-gap-override.html

Status: FAIL | Duration: 9ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-fonts/line-gap-override.html

<!DOCTYPE html>
<meta charset="utf-8">
<link rel="author" href="mailto:xiaochengh@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-fonts-4/#font-metrics-override-desc">
<link rel="match" href="line-gap-override-ref.html">
<title>Tests the line-gap-override descriptor of @font-face</title>
<style>
@font-face {
  font-family: Ahem;
  src: local(Ahem), url(/fonts/Ahem.ttf);
  line-gap-override: 100%;
}

.target {
  font: 20px Ahem;
  color: green;
  position: absolute;
  top: 10px;
  left: 10px;
}
</style>

<div class="target">
  X<br>
  X
</div>

/css/css-fonts/line-gap-override-ref.html

<!DOCTYPE html>
<meta charset="utf-8">
<title>Tests the line-gap-override descriptor of @font-face</title>
<style>
.target {
  position: absolute;
  font-size: 20px;
  top: 10px;
  left: 10px;
  width: 60px;
  height: 30px;
}

.character {
  display: inline-block;
  background-color: green;
  width: 1em;  /* Same as an 'X' in Ahem */
  height: 1em; /* Same as an 'X' in Ahem */
  position: absolute;
}

</style>
<div class="target">
  <span class="character" style="top: 0.5em; left: 0"></span>
  <span class="character" style="top: 2.5em; left: 0"></span>
</div>