refactor(fonts): hybrid FontManager init via SuppressAutoRebuild

Move font handle creation from BuildFonts() into the FontManager ctor
inside a single atlas.SuppressAutoRebuild() block. Axis, AxisItalic and
FontAwesome become init-only IFontHandle properties; RegularFont and
ItalicFont stay mutable so the live font-settings rebuild path keeps
working without a plugin reload.

- BuildFonts() renamed to RebuildDelegateFonts(), scope reduced to the
  delegate fonts only
- BuildFontsAsync() removed; Task.Run had no purpose with ctor-init
- FontManagerInitHostedService deleted; PluginHostFactory drops the
  matching AddHostedService registration
- PluginHostFactory FontManager registration takes IDalamudPluginInterface
  via factory lambda
- Settings save path now calls RebuildDelegateFonts() instead of
  BuildFonts()
- Plugin.Draw push site gets a null-forgiving for the nullable
  RegularFont with a one-line WHY
This commit is contained in:
2026-05-17 16:15:28 +02:00
parent 7e960371a3
commit 3283e51381
5 changed files with 167 additions and 129 deletions
+1 -1
View File
@@ -229,7 +229,7 @@ public sealed class SettingsWindow : Dalamud.Interface.Windowing.Window
}
if (fontChanged || fontSizeChanged || italicStateChanged)
Plugin.FontManager.BuildFonts();
Plugin.FontManager.RebuildDelegateFonts();
if (languageChanged)
Plugin.LanguageChanged(Plugin.Interface.UiLanguage);