feat(render): logical style metrics with a UI scale, so chrome has a consistent physical size

This commit is contained in:
Martino Ferrari committed 2026-09-28 12:17:53 +02:00
1 parent 1f03631e98
commit 7500fc90d2
21 files changed
+708 -82

No files matched your search

+3 -2
View File
@@ -52,8 +52,9 @@ class EmbeddedMonoFont final : public TextBackend {
/// Top of the cell to the baseline, in font pixels.
f32 ascent() const override;
/// `kEmPx`: the size the face was baked at. The renderer scales a run by
/// `Style::axis_font_px / em_px()`, so the same backend draws the size the
/// style asked for whatever it was baked at.
/// `Style::device(Style::axis_font_px) / em_px()` -- the style's logical em in
/// device pixels over this em -- so the same backend draws the size the style
/// asked for, on any DPI, whatever it was baked at.
f32 em_px() const override;
/// The glyph for `codepoint`: its atlas cell as a normalised rect, no extra