mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
When inline layout emits a whitespace chunk, it previously selected the surrounding text's font without checking whether that font actually contains a glyph for the whitespace codepoint. On pages that use `@font-face` rules sharded by `unicode-range` (e.g. a Roboto webfont split across one file for Cyrillic letters and another for basic Latin), the shard covering the letters is picked for an adjacent space even though the space codepoint lives in a different shard. HarfBuzz then shapes the space with a font that has no glyph for it and emits `.notdef`, rendering spaces as tofu boxes. Check `contains_glyph(space_code_point)` on each candidate in `font_for_space()` and fall through to `FontCascadeList::font_for_code_point()` for the whitespace codepoint when no surrounding font has the glyph. Fixes whitespace rendering on web.telegram.org/a.
2 lines
29 B
Plaintext
2 lines
29 B
Plaintext
space matches fallback: true
|