Files
OpenFrontIO/resources
Evan Pelle 0727c2cf4e Add a graphics setting to render names/troops in a bitmap Arial font
NamePass can now render player names and troop counts in an Arial bitmap font as an alternative to the overpass-bold MSDF font, toggled live via settings.name.classicFont (mirrors the structure-level font toggle).

The Arial atlas is built once at runtime with canvas 2D (there is no Arial asset to ship): each glyph is rasterized, its tight bbox found by a pixel scan, and the glyphs shelf-packed into a coverage atlas. It emits a ParsedAtlas with the same em size (48) and baseline (36) as the MSDF atlas, so it flows through the existing glyph-table/metrics/layout code and leaves name sizing, hit-testing, flag offsets and the icon/status passes unchanged. The name shader gains a uClassic branch that tints the coverage mask with the fill color (no outline, matching the old DOM-rendered names). On toggle, all name/troop lines are re-laid-out since glyph advances differ between the fonts.

Exposed as name.classicFont in GraphicsOverrides (default false = MSDF) with a Classic Names toggle in the graphics settings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 02:53:04 +00:00
..
2026-01-09 20:26:34 -08:00
2025-09-30 13:18:03 -07:00
2025-12-09 16:12:00 -08:00
2025-09-28 17:47:05 -07:00
2026-05-31 15:09:08 +01:00
2026-05-31 15:09:08 +01:00
2026-01-09 20:26:34 -08:00