mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Use Lock instead of .ImFont
This commit is contained in:
parent
af1133f999
commit
3e3297f7a8
1 changed files with 5 additions and 2 deletions
|
|
@ -725,13 +725,16 @@ internal class InterfaceManager : IDisposable, IServiceType
|
|||
// Do not use DefaultFont, IconFont, and MonoFont.
|
||||
// Use font handles directly.
|
||||
|
||||
using var defaultFont = this.DefaultFontHandle.Lock();
|
||||
using var monoFont = this.MonoFontHandle.Lock();
|
||||
|
||||
// Fill missing glyphs in MonoFont from DefaultFont
|
||||
tk.CopyGlyphsAcrossFonts(this.DefaultFontHandle.ImFont, this.MonoFontHandle.ImFont, true);
|
||||
tk.CopyGlyphsAcrossFonts(defaultFont, monoFont, true);
|
||||
|
||||
// Update default font
|
||||
unsafe
|
||||
{
|
||||
ImGui.GetIO().NativePtr->FontDefault = this.DefaultFontHandle.ImFont;
|
||||
ImGui.GetIO().NativePtr->FontDefault = defaultFont;
|
||||
}
|
||||
|
||||
// Broadcast to auto-rebuilding instances
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue