Fix alacritty term font size

#197
This commit is contained in:
Linus Dierheimer
2022-07-20 20:56:02 +02:00
parent e570cacbc9
commit 23bf7a407b
3 changed files with 11 additions and 6 deletions
+9 -1
View File
@@ -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);
+1
View File
@@ -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
+1 -5
View File
@@ -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);