diff --git a/Assets/Cryville/Common/Font/FontMatcher.cs b/Assets/Cryville/Common/Font/FontMatcher.cs index 0ef7b64..0df6b24 100644 --- a/Assets/Cryville/Common/Font/FontMatcher.cs +++ b/Assets/Cryville/Common/Font/FontMatcher.cs @@ -12,18 +12,18 @@ namespace Cryville.Common.Font { } public class FallbackListFontMatcher : FontMatcher { readonly LanguageMatching _matcher; - static readonly string UltimateFallbackScript = "zyyy"; + static readonly string UltimateFallbackScript = "zzzz"; public Dictionary> MapScriptToTypefaces = new Dictionary>(); public static Dictionary> GetDefaultWindowsFallbackMap() { var map = new Dictionary>(StringComparer.OrdinalIgnoreCase); FillKeysWithScripts(map, () => new List()); // Reference: https://github.com/chromium/chromium/blob/main/third_party/blink/renderer/platform/fonts/win/font_fallback_win.cc - map["zyyy"].Insert(0, "SimSun"); // Custom - map["zyyy"].Insert(0, "SimHei"); // Custom - map["zyyy"].Insert(0, "Microsoft YaHei"); // Custom - map["zyyy"].Insert(0, "Arial"); - map["zyyy"].Insert(0, "Times New Roman"); - map["zyyy"].Insert(0, "Segoe UI"); // Custom + map[UltimateFallbackScript].Insert(0, "SimSun"); // Custom + map[UltimateFallbackScript].Insert(0, "SimHei"); // Custom + map[UltimateFallbackScript].Insert(0, "Microsoft YaHei"); // Custom + map[UltimateFallbackScript].Insert(0, "Arial"); + map[UltimateFallbackScript].Insert(0, "Times New Roman"); + map[UltimateFallbackScript].Insert(0, "Segoe UI"); // Custom map["arab"].Insert(0, "Tahoma"); map["cyrl"].Insert(0, "Times New Roman"); map["grek"].Insert(0, "Times New Roman"); @@ -163,10 +163,10 @@ namespace Cryville.Common.Font { public static Dictionary> GetDefaultAndroidFallbackMap() { var map = new Dictionary>(StringComparer.OrdinalIgnoreCase); FillKeysWithScripts(map, () => new List()); - map["zyyy"].Insert(0, "Noto Sans CJK TC"); // TODO Modify default fallback - map["zyyy"].Insert(0, "Noto Sans CJK JP"); - map["zyyy"].Insert(0, "Noto Sans CJK SC"); - map["zyyy"].Insert(0, "Roboto"); + map[UltimateFallbackScript].Insert(0, "Noto Sans CJK TC"); // TODO Modify default fallback + map[UltimateFallbackScript].Insert(0, "Noto Sans CJK JP"); + map[UltimateFallbackScript].Insert(0, "Noto Sans CJK SC"); + map[UltimateFallbackScript].Insert(0, "Roboto"); map["zsye"].Insert(0, "Noto Color Emoji"); map["zsye"].Add("Noto Color Emoji Flags"); map["arab"].Insert(0, "Noto Naskh Arabic");