mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 08:13:44 +01:00
+9
-1
@@ -188,13 +188,21 @@ void ffFontInitPango(FFfont* font, const char* data)
|
||||
fontInitPretty(font);
|
||||
}
|
||||
|
||||
void ffFontInitCopy(FFfont* font, const char* name)
|
||||
void ffFontInitValues(FFfont* font, const char* name, const char* size)
|
||||
{
|
||||
fontInit(font);
|
||||
|
||||
ffStrbufAppendS(&font->name, name);
|
||||
ffStrbufAppendS(&font->size, size);
|
||||
|
||||
fontInitPretty(font);
|
||||
}
|
||||
|
||||
void ffFontInitCopy(FFfont* font, const char* name)
|
||||
{
|
||||
ffFontInitValues(font, name, NULL);
|
||||
}
|
||||
|
||||
void ffFontDestroy(FFfont* font)
|
||||
{
|
||||
ffStrbufDestroy(&font->pretty);
|
||||
|
||||
@@ -466,6 +466,7 @@ bool ffParsePropFileConfig(const FFinstance* instance, const char* relativeFile,
|
||||
void ffFontInitQt(FFfont* font, const char* data);
|
||||
void ffFontInitPango(FFfont* font, const char* data);
|
||||
void ffFontInitCopy(FFfont* font, const char* name);
|
||||
void ffFontInitValues(FFfont* font, const char* name, const char* size);
|
||||
void ffFontDestroy(FFfont* font);
|
||||
|
||||
//common/format.c
|
||||
|
||||
@@ -206,11 +206,7 @@ static void printAlacritty(FFinstance* instance) {
|
||||
ffStrbufAppendS(&fontSize, "11");
|
||||
|
||||
FFfont font;
|
||||
ffFontInitCopy(&font, fontName.chars);
|
||||
|
||||
if(fontSize.length > 0)
|
||||
ffStrbufSet(&font.size, &fontSize);
|
||||
|
||||
ffFontInitValues(&font, fontName.chars, fontSize.chars);
|
||||
printTerminalFont(instance, fontName.chars, &font);
|
||||
ffFontDestroy(&font);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user