mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 04:52:06 +02:00
Instead of rendering text glyphs into a separate mask surface and using clipShader, paint the backgrounds first and then composite the text glyphs via saveLayer with SkBlendMode::kDstIn. Skia's saveLayer automatically sizes its backing at device resolution including CSS transforms, so no manual scale computation is needed. Fixes pixelation when zooming in on clipped backgrounds on e.g. the title of https://modern-css.com/.
17 lines
255 B
HTML
17 lines
255 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
body { margin: 0; }
|
|
.scaled {
|
|
transform: scale(3);
|
|
transform-origin: left top;
|
|
}
|
|
.text {
|
|
font-size: 20px;
|
|
font-weight: 800;
|
|
color: red;
|
|
}
|
|
</style>
|
|
<div class="scaled">
|
|
<div class="text">Abcdefg</div>
|
|
</div>
|