Merge pull request #1617 from Soreepeong/fix/ifontatlas-defaultfont

Set ImGui default font upon default font atlas update
This commit is contained in:
goat 2024-01-20 10:16:29 +01:00 committed by GitHub
commit 11c1b4658b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -717,6 +717,12 @@ internal class InterfaceManager : IDisposable, IServiceType
// Fill missing glyphs in MonoFont from DefaultFont
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
this.AfterBuildFonts?.Invoke();
});
@ -889,11 +895,8 @@ internal class InterfaceManager : IDisposable, IServiceType
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);