@@ -418,6 +418,21 @@ static void detectWestonTerminal(FFTerminalFontResult* terminalFont)
418418 ffFontInitValues (& terminalFont -> font , font .chars , size .chars );
419419}
420420
421+ #ifdef __HAIKU__
422+ static void detectHaikuTerminal (FFTerminalFontResult * terminalFont )
423+ {
424+ FF_STRBUF_AUTO_DESTROY font = ffStrbufCreate ();
425+ FF_STRBUF_AUTO_DESTROY size = ffStrbufCreate ();
426+ ffParsePropFileConfigValues ("Terminal/Default" , 2 , (FFpropquery []) {
427+ {"\"Half Font Family\" , " , & font },
428+ {"\"Half Font Size\" , " , & size },
429+ });
430+ if (!font .length ) ffStrbufSetStatic (& font , "Noto Sans Mono" );
431+ if (!size .length ) ffStrbufSetStatic (& size , "12" );
432+ ffFontInitValues (& terminalFont -> font , font .chars , size .chars );
433+ }
434+ #endif
435+
421436void ffDetectTerminalFontPlatform (const FFTerminalResult * terminal , FFTerminalFontResult * terminalFont )
422437{
423438 if (ffStrbufIgnCaseEqualS (& terminal -> processName , "konsole" ))
@@ -455,5 +470,9 @@ void ffDetectTerminalFontPlatform(const FFTerminalResult* terminal, FFTerminalFo
455470 else if (ffStrbufStartsWithIgnCaseS (& terminal -> processName , "terminator" ))
456471 detectTerminator (terminalFont );
457472 else if (ffStrbufStartsWithIgnCaseS (& terminal -> processName , "sakura" ))
458- detectFromConfigFile ("sakura/sakura.conf" , "font=" , terminalFont );;
473+ detectFromConfigFile ("sakura/sakura.conf" , "font=" , terminalFont );
474+ #ifdef __HAIKU__
475+ else if (ffStrbufStartsWithIgnCaseS (& terminal -> processName , "Terminal "))
476+ detectHaikuTerminal (terminalFont );
477+ #endif
459478}
0 commit comments