Automatic update from web-platform-tests text-fit: Fix line metrics computation for text-emphasis When the `text-fit` property is used, text is scaled to fit its container. However, the outsets for text emphasis marks were being calculated using the unscaled font metrics, leading to incorrect line box heights and potential overlaps or gaps. This patch updates `InlineBoxState::ComputeEmphasisMarkOutsets` to accept a scale factor. Bug: 417306102 Change-Id: I80e60d1253a827d2dbf41db655ed345a1e38786f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7838980 Reviewed-by: Koji Ishii <kojii@chromium.org> Commit-Queue: Koji Ishii <kojii@chromium.org> Auto-Submit: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/main@{#1630495} -- wpt-commits: 096ae859902ae21e7740ca29b9ed7810567d5d24 wpt-pr: 59904
49 lines
898 B
HTML
49 lines
898 B
HTML
<!DOCTYPE html>
|
|
<html class="reftest-wait">
|
|
<meta charset="utf-8">
|
|
<meta name="flags" content="ahem">
|
|
<link rel="stylesheet" href="/fonts/ahem.css">
|
|
<style>
|
|
.common {
|
|
font: 20px/1 Ahem;
|
|
width: 160px;
|
|
white-space: pre;
|
|
border: 1px solid gray;
|
|
margin: 20px;
|
|
text-emphasis: 'e' blue;
|
|
}
|
|
|
|
.grow-consistent {
|
|
font-size: 40px;
|
|
}
|
|
|
|
.grow-line {
|
|
}
|
|
|
|
.shrink-consistent {
|
|
font-size: 10px;
|
|
width: 80px;
|
|
}
|
|
|
|
.shrink-line {
|
|
font-size: 10px;
|
|
width: 80px;
|
|
}
|
|
</style>
|
|
|
|
<div class="common grow-consistent">ÉpÉ
|
|
pÉpÉ</div>
|
|
<div class="common grow-line"><span style="font-size:40px;">ÉpÉp</span>
|
|
pÉpÉpÉpÉ</div>
|
|
|
|
<div class="common shrink-consistent">ÉpÉ
|
|
pÉpÉpÉpÉ</div>
|
|
<div class="common shrink-line"><span style="font-size:20px;">ÉpÉp</span>
|
|
pÉpÉpÉpÉ</div>
|
|
|
|
<script>
|
|
document.fonts.ready.then(() => {
|
|
document.documentElement.classList.remove('reftest-wait');
|
|
});
|
|
</script>
|