mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-14 20:54:16 +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.
|
// Do not use DefaultFont, IconFont, and MonoFont.
|
||||||
// Use font handles directly.
|
// Use font handles directly.
|
||||||
|
|
||||||
|
using var defaultFont = this.DefaultFontHandle.Lock();
|
||||||
|
using var monoFont = this.MonoFontHandle.Lock();
|
||||||
|
|
||||||
// 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(defaultFont, monoFont, true);
|
||||||
|
|
||||||
// Update default font
|
// Update default font
|
||||||
unsafe
|
unsafe
|
||||||
{
|
{
|
||||||
ImGui.GetIO().NativePtr->FontDefault = this.DefaultFontHandle.ImFont;
|
ImGui.GetIO().NativePtr->FontDefault = defaultFont;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Broadcast to auto-rebuilding instances
|
// Broadcast to auto-rebuilding instances
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue