mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Font: optimise output for Windows
This commit is contained in:
@@ -25,6 +25,7 @@ Features:
|
||||
* Enhance `--percent-type` to allow hiding other texts (#387)
|
||||
* Add Wifi module support for Linux
|
||||
* Detect scaled resolutions (Windows, macOS)
|
||||
* Optimise font module printing (Windows)
|
||||
|
||||
Logos:
|
||||
* Raspbian (@IamNoRobot, #373)
|
||||
|
||||
+9
-3
@@ -48,12 +48,18 @@ static void printFont(const FFFontResult* font)
|
||||
const char* types[] = { "Caption", "Menu", "Message", "Status" };
|
||||
for(uint32_t i = 0; i < sizeof(types) / sizeof(types[0]); ++i)
|
||||
{
|
||||
if(font->fonts[i].length > 0)
|
||||
if(i == 0 || !ffStrbufEqual(&font->fonts[i - 1], &font->fonts[i]))
|
||||
{
|
||||
printf("%s [%s]", font->fonts[i].chars, types[i]);
|
||||
break;
|
||||
if(i > 0)
|
||||
fputs("], ", stdout);
|
||||
printf("%s [%s", font->fonts[i].chars, types[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf(" / %s", types[i]);
|
||||
}
|
||||
}
|
||||
putchar(']');
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user