use direct write to get system fonts

This commit is contained in:
ohyzha
2025-01-21 11:54:58 +02:00
parent f55fb37730
commit 4442d1b0fc
2 changed files with 96 additions and 15 deletions

View File

@@ -19,14 +19,14 @@ TEST_CASE("Search system fonts")
// assume these fonts are present since they are default
std::filesystem::path path = SystemFontResolver::GetSystemFontPath("Arial");
REQUIRE(path.filename() == "arial.ttf");
REQUIRE(path.filename() == "ARIAL.TTF");
// assume these fonts are present since they are default
path = SystemFontResolver::GetSystemFontPath("Times New Roman");
REQUIRE(path.filename() == "times.ttf");
REQUIRE(path.filename() == "TIMES.TTF");
path = SystemFontResolver::GetSystemFontPath("Arial Bold Italic");
REQUIRE(path.filename() == "arialbi.ttf");
REQUIRE(path.filename() == "ARIALBI.TTF");
path = SystemFontResolver::GetSystemFontPath("NON-EXISTING Font");
REQUIRE(path.empty());