From 10c7e15f92fce921fb724e4ce5db1481c57519a1 Mon Sep 17 00:00:00 2001 From: Justin Scofield Date: Mon, 30 Dec 2024 09:56:26 -0500 Subject: [PATCH] Add font path prefix for non apple platforms --- src/app/core/platform/font_loader.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/core/platform/font_loader.cc b/src/app/core/platform/font_loader.cc index 1561e530..fef22367 100644 --- a/src/app/core/platform/font_loader.cc +++ b/src/app/core/platform/font_loader.cc @@ -62,7 +62,8 @@ absl::Status LoadPackageFonts() { "Contents/Resources/font/", font_path); #endif #else - actual_font_path = std::filesystem::absolute(font_path).string(); + actual_font_path = absl::StrCat("assets/font/", font_path); + actual_font_path = std::filesystem::absolute(actual_font_path).string(); #endif if (!io.Fonts->AddFontFromFileTTF(actual_font_path.data(), font_size)) { @@ -104,8 +105,9 @@ absl::Status LoadPackageFonts() { japanese_font_path); #endif #else + actual_japanese_font_path = absl::StrCat("assets/font/", japanese_font_path); actual_japanese_font_path = - std::filesystem::absolute(japanese_font_path).string(); + std::filesystem::absolute(actual_japanese_font_path).string(); #endif io.Fonts->AddFontFromFileTTF(actual_japanese_font_path.data(), 18.0f, &japanese_font_config,