From 8b7a4daeda38b7a4979d515113891516508f4bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 4 Apr 2024 11:09:28 +0800 Subject: [PATCH] TerminalFont: use system mono font if no config file is find --- CHANGELOG.md | 1 + src/detection/terminalfont/terminalfont_linux.c | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0a68e0aa..584f7cc0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Features: Bugfixes: * Fix network prefix length detection when the value is greater than 24 (#773, LocalIP, Linux) +* For xfce4-terminal, use system mono font if no config file is found (TerminalFont, Linux) # 2.8.10 diff --git a/src/detection/terminalfont/terminalfont_linux.c b/src/detection/terminalfont/terminalfont_linux.c index b843465cb..3a6ac9086 100644 --- a/src/detection/terminalfont/terminalfont_linux.c +++ b/src/detection/terminalfont/terminalfont_linux.c @@ -145,13 +145,7 @@ static void detectXFCETerminal(FFTerminalFontResult* terminalFont) }); } - if (!configFound) - { - ffStrbufSetStatic(&terminalFont->error, "Couldn't find xfce4/xfconf/xfce-perchannel-xml/xfce4-terminal.xml or xfce4/terminal/terminalrc"); - return; - } - - if(useSysFont.length == 0 || ffStrbufIgnCaseCompS(&useSysFont, "false") == 0) + if(configFound && (useSysFont.length == 0 || ffStrbufIgnCaseCompS(&useSysFont, "false") == 0)) { if(fontName.length == 0) ffStrbufAppendF(&terminalFont->error, "Couldn't find FontName in %s", path);