Skip to content

Commit 2ab2dd4

Browse files
committed
TerminalFont (macOS): fix ghostty font detection; default to JetBrains Mono
Ref: #1466 (comment)
1 parent 2a83b86 commit 2ab2dd4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/detection/terminalfont/terminalfont.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,18 @@ static void detectGhostty(FFTerminalFontResult* terminalFont)
5858
{"font-size =", &fontSize},
5959
};
6060

61-
if (!ffParsePropFileConfigValues("ghostty/config", 2, fontQueryToml))
62-
{
61+
if (
62+
#if __APPLE__
63+
!ffParsePropFileConfigValues("com.mitchellh.ghostty/config", 2, fontQueryToml) &&
64+
#endif
65+
!ffParsePropFileConfigValues("ghostty/config", 2, fontQueryToml)
66+
) {
6367
ffStrbufAppendS(&terminalFont->error, "Couldn't find file `ghostty/config`");
6468
return;
6569
}
6670

6771
if(fontName.length == 0)
68-
ffStrbufAppendS(&fontName, "monospace");
72+
ffStrbufAppendS(&fontName, "JetBrains Mono");
6973

7074
if(fontSize.length == 0)
7175
ffStrbufAppendS(&fontSize, "13");

0 commit comments

Comments
 (0)