Add font path prefix for non apple platforms
This commit is contained in:
@@ -62,7 +62,8 @@ absl::Status LoadPackageFonts() {
|
|||||||
"Contents/Resources/font/", font_path);
|
"Contents/Resources/font/", font_path);
|
||||||
#endif
|
#endif
|
||||||
#else
|
#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
|
#endif
|
||||||
|
|
||||||
if (!io.Fonts->AddFontFromFileTTF(actual_font_path.data(), font_size)) {
|
if (!io.Fonts->AddFontFromFileTTF(actual_font_path.data(), font_size)) {
|
||||||
@@ -104,8 +105,9 @@ absl::Status LoadPackageFonts() {
|
|||||||
japanese_font_path);
|
japanese_font_path);
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
actual_japanese_font_path = absl::StrCat("assets/font/", japanese_font_path);
|
||||||
actual_japanese_font_path =
|
actual_japanese_font_path =
|
||||||
std::filesystem::absolute(japanese_font_path).string();
|
std::filesystem::absolute(actual_japanese_font_path).string();
|
||||||
#endif
|
#endif
|
||||||
io.Fonts->AddFontFromFileTTF(actual_japanese_font_path.data(), 18.0f,
|
io.Fonts->AddFontFromFileTTF(actual_japanese_font_path.data(), 18.0f,
|
||||||
&japanese_font_config,
|
&japanese_font_config,
|
||||||
|
|||||||
Reference in New Issue
Block a user