Render Slovak carons in menus and HUD without disturbing the other text

The stock menu font (Gill Sans MT Menu) is a static 243-glyph atlas with no
Latin Extended-A, so "Pokračovať" rendered as "Pokra ova" and "Podrž" as
"Podr". Dialogue, the Nomai translator and the ship log were always fine —
they use Futura PT (663) and Space Mono (612), both of which cover Slovak.

Registering a language font via AddLanguageFont fixes the menus but flips
TextTranslation.IsLanguageLatin() to false, and the game uses that flag to
decide whether dialogue, the translator and the ship log keep their own fonts
or fall back to the language font. So the blanket fix dragged all three onto
the wrong font, oversized and clipping.

Instead: register no language font at all, and postfix only the font getters
(UIStyleManager, PromptManager, GameOverController). Each result goes through
SlovakFont.Fix, which probes the font with Font.HasCharacter and returns it
untouched unless it genuinely cannot draw Slovak — so nothing that already
renders correctly is ever replaced, and the patches are inert in every other
language.

The substitute is Cabin (SIL OFL 1.1), a humanist sans in the Gill Sans
lineage, shipped as a dynamic font with its vertical metrics rewritten to Gill
Sans MT's exact ratios so line height matches and text does not clip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Jaroslav Beneš
2026-07-21 09:02:56 +02:00
parent 41ee614d33
commit 832a92783b
6 changed files with 312 additions and 5 deletions
+6
View File
@@ -55,6 +55,12 @@ See [`CLAUDE.md`](CLAUDE.md) for the full conventions and repo layout.
The **original mod code and the Slovak translation** in this repository are
released under the [MIT License](LICENSE).
The bundled UI font in `assets/slovakfont` is **[Cabin](https://github.com/impallari/Cabin)**
by the Cabin Project Authors, used under the **SIL Open Font License 1.1**
(see [`assets/Cabin-OFL.txt`](assets/Cabin-OFL.txt)). It is only used for the few
menu/HUD elements whose stock font was never baked with Slovak caron glyphs — see
[`SlovakFont.cs`](SlovakFont.cs).
This is an **unofficial** fan project. It is **not affiliated with, approved by, or
endorsed by Mobius Digital or Annapurna Interactive.** *Outer Wilds*, its story,
dialogue, characters, and other assets are **© Mobius Digital / Annapurna