Set ImGui default font upon default font atlas update

This commit is contained in:
Soreepeong 2024-01-20 10:21:50 +09:00
parent f6b699d18f
commit 1a19cbf277

View file

@ -717,6 +717,12 @@ internal class InterfaceManager : IDisposable, IServiceType
// Fill missing glyphs in MonoFont from DefaultFont // Fill missing glyphs in MonoFont from DefaultFont
tk.CopyGlyphsAcrossFonts(this.defaultFontHandle.ImFont, this.monoFontHandle.ImFont, true); tk.CopyGlyphsAcrossFonts(this.defaultFontHandle.ImFont, this.monoFontHandle.ImFont, true);
// Update default font
unsafe
{
ImGui.GetIO().NativePtr->FontDefault = this.defaultFontHandle.ImFont;
}
// Broadcast to auto-rebuilding instances // Broadcast to auto-rebuilding instances
this.AfterBuildFonts?.Invoke(); this.AfterBuildFonts?.Invoke();
}); });
@ -889,11 +895,8 @@ internal class InterfaceManager : IDisposable, IServiceType
if (this.IsDispatchingEvents) if (this.IsDispatchingEvents)
{ {
using (this.defaultFontHandle?.Push()) this.Draw?.Invoke();
{ Service<NotificationManager>.Get().Draw();
this.Draw?.Invoke();
Service<NotificationManager>.Get().Draw();
}
} }
ImGuiManagedAsserts.ReportProblems("Dalamud Core", snap); ImGuiManagedAsserts.ReportProblems("Dalamud Core", snap);