Calibrate native text weight and advances

This commit is contained in:
gamer147
2026-07-28 16:00:14 -04:00
parent b6272e0ccf
commit 69c60ded2e
4 changed files with 73 additions and 14 deletions

View File

@@ -3357,6 +3357,25 @@ records, and the Godot self-test applies both modes to a real Label and checks i
state. Validation: engine **431/431**, zero-warning Godot build, and threaded `SELFTEST OK` with
`text-effect-modes=ok`. User visual acceptance passed on 2026-07-28.
## ADV font weight and advance calibrated (2026-07-28)
A disposable Windows GDI oracle measured six representative strings and the grayscale `` glyph
against Godot's actual `msmincho.ttc`/`msgothic.ttc` presentation. Regular 24px Mincho and 16px Gothic
advances match exactly, so neither face receives speculative horizontal scaling. The former
`VariationEmbolden=1.2` overshot native weight-700 glyph coverage by 44% while remaining up to 9 pixels
narrow across a complete sample string.
The bold variation now uses measured `VariationEmbolden=0.53` plus one pixel of glyph spacing. Its
grayscale coverage is within 0.3% of GDI and the six measured string widths are within 0..3 pixels.
The shared style path also compensates for Godot reporting the two fonts' line boxes one pixel taller
than AGE's explicit requested heights, preserving native total line advance during wrapping. The Godot
self-test checks the calibrated variation and both 24px/16px spacing examples.
Validation: engine **431/431**, zero-warning Godot build, and threaded `SELFTEST OK` with
`font-calibration=ok`. The probes were deliberately disposable; the canonical measurements live in
`docs/engine-re.md` rather than adding a Windows-only runtime/tool dependency. User visual acceptance
passed on 2026-07-28.
## Persistence native-format reconnaissance complete (2026-07-24)
The deferred save/profile ownership question now has a compatibility-mode answer. The remaining native