From a0499ac9501a7ffb5306ad6c76f3fba7be47a47f Mon Sep 17 00:00:00 2001 From: Michael Babienco Date: Sun, 4 Jan 2026 09:01:49 +0900 Subject: [PATCH] More path checking for macOS bundle --- ViewModels/MainViewModel.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ViewModels/MainViewModel.cs b/ViewModels/MainViewModel.cs index bfa0713..83e2e44 100644 --- a/ViewModels/MainViewModel.cs +++ b/ViewModels/MainViewModel.cs @@ -89,10 +89,20 @@ class MainViewModel : BaseViewModel, IFontResolver LogInfo(string.Format("Loading font {0}", faceName)); if (faceName == "Noto Sans JP") { - return File.ReadAllBytes(Path.Combine(_baseDir, "Assets/Fonts/Noto_Sans_JP/static/NotoSansJP-Regular.ttf")); + var path = Path.Combine(_baseDir, "Assets/Fonts/Noto_Sans_JP/static/NotoSansJP-Regular.ttf"); + if (!File.Exists(path)) + { + path = Path.Combine(_baseDir, "../Resources/Assets/Fonts/Noto_Sans_JP/static/NotoSansJP-Regular.ttf"); + } + return File.ReadAllBytes(path); } if (faceName == "Noto Sans JP Bold") { + var path = Path.Combine(_baseDir, "Assets/Fonts/Noto_Sans_JP/static/NotoSansJP-SemiBold.ttf"); + if (!File.Exists(path)) + { + path = Path.Combine(_baseDir, "../Resources/Assets/Fonts/Noto_Sans_JP/static/NotoSansJP-SemiBold.ttf"); + } return File.ReadAllBytes(Path.Combine(_baseDir, "Assets/Fonts/Noto_Sans_JP/static/NotoSansJP-SemiBold.ttf")); } return null;