Font: improve performance (Windows)

This commit is contained in:
李通洲
2022-11-23 19:57:55 +08:00
parent 31863baee2
commit 325aa536c4
5 changed files with 31 additions and 36 deletions
+7 -2
View File
@@ -45,9 +45,14 @@ static void printFont(const FFFontResult* font)
static void printFont(const FFFontResult* font)
{
if(font->fonts[0].length > 0)
const char* types[] = { "Caption", "Menu", "Message", "Status" };
for(uint32_t i = 0; i < sizeof(types) / sizeof(types[0]); ++i)
{
printf("%s [Desktop]", font->fonts[0].chars);
if(font->fonts[i].length > 0)
{
printf("%s [%s]", font->fonts[i].chars, types[i]);
break;
}
}
}