mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-03-04 21:16:36 +00:00
Compare commits
3 Commits
v2.2.6
...
6c1400e62c
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c1400e62c | |||
| 25fb5285f7 | |||
|
|
87059f8ca3 |
@@ -304,7 +304,14 @@ extern "C"
|
|||||||
mlx::Error("Font loader: filepath is NULL");
|
mlx::Error("Font loader: filepath is NULL");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::filesystem::path file(filepath);
|
std::filesystem::path file(filepath);
|
||||||
|
if (std::strcmp(filepath, "default") != 0 && !std::filesystem::exists(file))
|
||||||
|
{
|
||||||
|
mlx::Error("TTF loader: unable to find file '%'", filepath);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(std::strcmp(filepath, "default") != 0 && file.extension() != ".ttf" && file.extension() != ".tte")
|
if(std::strcmp(filepath, "default") != 0 && file.extension() != ".ttf" && file.extension() != ".tte")
|
||||||
{
|
{
|
||||||
mlx::Error("TTF loader: not a truetype font file '%'", filepath);
|
mlx::Error("TTF loader: not a truetype font file '%'", filepath);
|
||||||
@@ -324,7 +331,14 @@ extern "C"
|
|||||||
mlx::Error("Font loader: filepath is NULL");
|
mlx::Error("Font loader: filepath is NULL");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::filesystem::path file(filepath);
|
std::filesystem::path file(filepath);
|
||||||
|
if (std::strcmp(filepath, "default") != 0 && !std::filesystem::exists(file))
|
||||||
|
{
|
||||||
|
mlx::Error("TTF loader: unable to find file '%'", filepath);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(std::strcmp(filepath, "default") != 0 && file.extension() != ".ttf" && file.extension() != ".tte")
|
if(std::strcmp(filepath, "default") != 0 && file.extension() != ".ttf" && file.extension() != ".tte")
|
||||||
{
|
{
|
||||||
mlx::Error("TTF loader: not a truetype font file '%'", filepath);
|
mlx::Error("TTF loader: not a truetype font file '%'", filepath);
|
||||||
|
|||||||
Reference in New Issue
Block a user