From 9c86ee788f9f397e026c68e0e0a4af5485eab209 Mon Sep 17 00:00:00 2001 From: Infi Date: Thu, 25 Jul 2024 14:03:08 +0200 Subject: [PATCH] fix --- ChatTwo/Configuration.cs | 4 ++-- ChatTwo/FontManager.cs | 8 ++++---- ChatTwo/Ui/Settings.cs | 2 +- ChatTwo/Ui/SettingsTabs/Fonts.cs | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ChatTwo/Configuration.cs b/ChatTwo/Configuration.cs index 9fd936f..fd9cd78 100755 --- a/ChatTwo/Configuration.cs +++ b/ChatTwo/Configuration.cs @@ -88,7 +88,7 @@ internal class Configuration : IPluginConfiguration FontId = new DalamudAssetFontAndFamilyId(DalamudAsset.NotoSansKrRegular), // dalamud only ships KR as regular, which chat2 used previously for global fonts SizePt = 12.75f, }; - public SingleFontSpec JapaneseFontV3 = new() + public SingleFontSpec JapaneseFontV2 = new() { FontId = new DalamudAssetFontAndFamilyId(DalamudAsset.NotoSansJpMedium), SizePt = 12.75f, @@ -162,7 +162,7 @@ internal class Configuration : IPluginConfiguration ExtraGlyphRanges = other.ExtraGlyphRanges; FontSizeV2 = other.FontSizeV2; GlobalFontV2 = other.GlobalFontV2; - JapaneseFontV3 = other.JapaneseFontV3; + JapaneseFontV2 = other.JapaneseFontV2; SymbolsFontSizeV2 = other.SymbolsFontSizeV2; TooltipOffset = other.TooltipOffset; WindowAlpha = other.WindowAlpha; diff --git a/ChatTwo/FontManager.cs b/ChatTwo/FontManager.cs index 14aa9cb..a05597d 100644 --- a/ChatTwo/FontManager.cs +++ b/ChatTwo/FontManager.cs @@ -118,9 +118,9 @@ public class FontManager var config = new SafeFontConfig {SizePt = Plugin.Config.GlobalFontV2.SizePt, GlyphRanges = Ranges}; config.MergeFont = Plugin.Config.GlobalFontV2.FontId.AddToBuildToolkit(tk, config); - config.SizePt = Plugin.Config.JapaneseFontV3.SizePt; + config.SizePt = Plugin.Config.JapaneseFontV2.SizePt; config.GlyphRanges = JpRange; - Plugin.Config.JapaneseFontV3.FontId.AddToBuildToolkit(tk, config); + Plugin.Config.JapaneseFontV2.FontId.AddToBuildToolkit(tk, config); config.SizePt = Plugin.Config.SymbolsFontSizeV2; config.GlyphRanges = SymRange; @@ -140,9 +140,9 @@ public class FontManager var config = new SafeFontConfig {SizePt = Plugin.Config.GlobalFontV2.SizePt, GlyphRanges = Ranges}; config.MergeFont = italicVersion?.AddToBuildToolkit(tk, config) ?? Plugin.Config.GlobalFontV2.FontId.AddToBuildToolkit(tk, config); - config.SizePt = Plugin.Config.JapaneseFontV3.SizePt; + config.SizePt = Plugin.Config.JapaneseFontV2.SizePt; config.GlyphRanges = JpRange; - Plugin.Config.JapaneseFontV3.FontId.AddToBuildToolkit(tk, config); + Plugin.Config.JapaneseFontV2.FontId.AddToBuildToolkit(tk, config); config.SizePt = Plugin.Config.SymbolsFontSizeV2; config.GlyphRanges = SymRange; diff --git a/ChatTwo/Ui/Settings.cs b/ChatTwo/Ui/Settings.cs index d1f3e31..809e936 100755 --- a/ChatTwo/Ui/Settings.cs +++ b/ChatTwo/Ui/Settings.cs @@ -151,7 +151,7 @@ public sealed class SettingsWindow : Window var hideChanged = !Mutable.HideChat && Mutable.HideChat != Plugin.Config.HideChat; var languageChanged = Mutable.LanguageOverride != Plugin.Config.LanguageOverride; var fontChanged = Mutable.GlobalFontV2 != Plugin.Config.GlobalFontV2 - || Mutable.JapaneseFontV3 != Plugin.Config.JapaneseFontV3 + || Mutable.JapaneseFontV2 != Plugin.Config.JapaneseFontV2 || Mutable.ExtraGlyphRanges != Plugin.Config.ExtraGlyphRanges; var fontSizeChanged = Math.Abs(Mutable.SymbolsFontSizeV2 - Plugin.Config.SymbolsFontSizeV2) > 0.001 || Math.Abs(Mutable.FontSizeV2 - Plugin.Config.FontSizeV2) > 0.001; diff --git a/ChatTwo/Ui/SettingsTabs/Fonts.cs b/ChatTwo/Ui/SettingsTabs/Fonts.cs index cb3263a..7cbd869 100755 --- a/ChatTwo/Ui/SettingsTabs/Fonts.cs +++ b/ChatTwo/Ui/SettingsTabs/Fonts.cs @@ -47,15 +47,15 @@ public class Fonts : ISettingsTab ImGui.Spacing(); // LocaleNames being null means it is likely a game font which all support JP symbols - var japaneseChooser = ImGuiUtil.FontChooser(Language.Options_JapaneseFont_Name, Mutable.JapaneseFontV3, id => !id.LocaleNames?.ContainsKey("ja-jp") ?? false, "いろはにほへと ちりぬるを"); + var japaneseChooser = ImGuiUtil.FontChooser(Language.Options_JapaneseFont_Name, Mutable.JapaneseFontV2, id => !id.LocaleNames?.ContainsKey("ja-jp") ?? false, "いろはにほへと ちりぬるを"); japaneseChooser?.ResultTask.ContinueWith(r => { if (r.IsCompletedSuccessfully) - Mutable.JapaneseFontV3 = r.Result; + Mutable.JapaneseFontV2 = r.Result; }); ImGui.SameLine(); if (ImGui.Button("Reset##japanese")) - Mutable.GlobalFontV2 = new SingleFontSpec{ FontId = new DalamudAssetFontAndFamilyId(DalamudAsset.NotoSansJpMedium), SizePt = 12.75f }; + Mutable.JapaneseFontV2 = new SingleFontSpec{ FontId = new DalamudAssetFontAndFamilyId(DalamudAsset.NotoSansJpMedium), SizePt = 12.75f }; ImGuiUtil.HelpText($"[Old Font] {Mutable.JapaneseFont} ({FontManager.SizeInPt(Mutable.JapaneseFontSize)}pt)"); // TODO Remove after 24.08 ImGuiUtil.HelpText(string.Format(Language.Options_JapaneseFont_Description, Plugin.PluginName));