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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user