linux 编译通过

This commit is contained in:
2026-02-17 21:40:55 +08:00
parent a5379b3816
commit 7134b61dc2
3 changed files with 60 additions and 1 deletions

View File

@@ -49,7 +49,11 @@ int main(int argc, char **argv) {
}
// 加载字体(使用系统默认字体或项目字体)
#ifdef _WIN32
std::string fontPath = "C:/Windows/Fonts/arial.ttf"; // Windows 系统字体
#else
std::string fontPath = "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf"; // Linux 系统字体
#endif
FontAtlas *font = nullptr;
// 尝试加载字体