mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
Call RebuildFonts on next Framework.Tick on NewFontRef (#926)
This commit is contained in:
parent
396e5fefca
commit
8cb28d0ebe
1 changed files with 4 additions and 10 deletions
|
|
@ -6,6 +6,7 @@ using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Dalamud.Data;
|
using Dalamud.Data;
|
||||||
|
using Dalamud.Game;
|
||||||
using Dalamud.Interface.Internal;
|
using Dalamud.Interface.Internal;
|
||||||
using Dalamud.Utility.Timing;
|
using Dalamud.Utility.Timing;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
|
|
@ -184,16 +185,9 @@ namespace Dalamud.Interface.GameFonts
|
||||||
needRebuild = !this.fonts.ContainsKey(style);
|
needRebuild = !this.fonts.ContainsKey(style);
|
||||||
if (needRebuild)
|
if (needRebuild)
|
||||||
{
|
{
|
||||||
if (interfaceManager.IsBuildingFontsBeforeAtlasBuild && this.isBetweenBuildFontsAndRightAfterImGuiIoFontsBuild)
|
Log.Information("[GameFontManager] NewFontRef: Queueing RebuildFonts because {0} has been requested.", style.ToString());
|
||||||
{
|
Service<Framework>.GetAsync()
|
||||||
Log.Information("[GameFontManager] NewFontRef: Building {0} right now, as it is called while BuildFonts is already in progress yet atlas build has not been called yet.", style.ToString());
|
.ContinueWith(task => task.Result.RunOnTick(() => interfaceManager.RebuildFonts()));
|
||||||
this.EnsureFont(style);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Log.Information("[GameFontManager] NewFontRef: Calling RebuildFonts because {0} has been requested.", style.ToString());
|
|
||||||
interfaceManager.RebuildFonts();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new(this, style);
|
return new(this, style);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue