UI: sharper, higher-contrast text, most visible on Windows (#76)

- Glyphs are rendered on whole pixels: egui's sub-pixel binning draws
  each glyph at quarter-pixel offsets, which it notes makes text
  blurrier, most visibly at the 100-150 % scaling common on Windows.
- Light theme: a mild gamma (0.75) on glyph coverage darkens the
  antialiased edges of dark text, which egui renders linearly (thin and
  grey next to the system's text). The dark theme keeps egui's curve.
- The faintest text colour met only 3.3:1 (light) and 3.9:1 (dark).
  It is now #6B6B73 / #97979E, so every text colour meets WCAG AA
  (4.5:1) on every surface in both themes, enforced by a test.

Compared in headless renders at 1x and 2x: crisper stems at 1x, little
change at 2x.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bflatastic
2026-10-07 01:50:38 +07:00
co-authored by Claude Opus 5.5
parent 90c56e9ff0
commit 71fcf5be8e
2 changed files with 45 additions and 4 deletions
+2 -2
View File
@@ -1586,8 +1586,8 @@ milestone = "M3"
status = "shipped"
commands = ["view.theme"]
tools = []
evidence = ["crates/ui-egui/tests/ui.rs::theme_and_view_options_apply"]
notes = ""
evidence = ["crates/ui-egui/tests/ui.rs::theme_and_view_options_apply", "crates/ui-egui/src/theme.rs::text_is_readable_on_every_surface"]
notes = "every text colour meets WCAG AA (4.5:1) on every surface in both themes; glyphs are pixel-aligned for sharper text at 100–150 % scaling"
[[feature]]
id = "view.theme-system"