Set explicit fallback font size, and add fallback font notice window (#800)

This commit is contained in:
kizer 2022-04-18 08:26:20 +09:00 committed by GitHub
parent 2becb12855
commit 1e5c906ce8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 242 additions and 80 deletions

View file

@ -197,7 +197,9 @@ namespace Dalamud.Interface.Internal.Windows
var configuration = Service<DalamudConfiguration>.Get();
var interfaceManager = Service<InterfaceManager>.Get();
var rebuildFont = interfaceManager.FontGamma != configuration.FontGammaLevel;
var rebuildFont = interfaceManager.FontGamma != configuration.FontGammaLevel
|| interfaceManager.FontResolutionLevel != configuration.FontResolutionLevel
|| interfaceManager.UseAxis != configuration.UseAxisFontsFromGame;
ImGui.GetIO().FontGlobalScale = configuration.GlobalUiScale;
interfaceManager.FontGammaOverride = null;
@ -396,6 +398,18 @@ namespace Dalamud.Interface.Internal.Windows
ImGui.GetIO().Fonts.TexHeight));
ImGui.PopStyleColor();
if (Service<DalamudConfiguration>.Get().DisableFontFallbackNotice)
{
ImGui.Text(Loc.Localize("DalamudSettingsFontResolutionLevelWarningDisabled", "Warning will not be displayed even when the limits are enforced and fonts become blurry."));
if (ImGui.Button(Loc.Localize("DalamudSettingsFontResolutionLevelWarningReset", "Show warnings") + "##DalamudSettingsFontResolutionLevelWarningReset"))
{
Service<DalamudConfiguration>.Get().DisableFontFallbackNotice = false;
Service<DalamudConfiguration>.Get().Save();
if (Service<InterfaceManager>.Get().IsFallbackFontMode)
Service<DalamudInterface>.Get().OpenFallbackFontNoticeWindow();
}
}
ImGuiHelpers.ScaledDummy(10);
ImGui.TextColored(ImGuiColors.DalamudGrey, Loc.Localize("DalamudSettingToggleUiHideOptOutNote", "Plugins may independently opt out of the settings below."));