fix
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user