@@ -401,6 +401,24 @@ static void detectWestonTerminal(FFTerminalFontResult* terminalFont) {
401401 ffFontInitValues (& terminalFont -> font , font .chars , size .chars );
402402}
403403
404+ static void detectKmscon (FFTerminalFontResult * terminalFont ) {
405+ FF_STRBUF_AUTO_DESTROY fontName = ffStrbufCreate ();
406+ FF_STRBUF_AUTO_DESTROY fontSize = ffStrbufCreate ();
407+
408+ ffParsePropFileConfigValues ("kmscon/kmscon.conf" , 2 , (FFpropquery []){
409+ { "font-size=" , & fontSize },
410+ { "font-name=" , & fontName },
411+ });
412+
413+ if (fontName .length == 0 ) {
414+ ffStrbufSetStatic (& fontName , "Hack Nerd Font" );
415+ }
416+ if (fontSize .length == 0 ) {
417+ ffStrbufSetStatic (& fontSize , "18" );
418+ }
419+ ffFontInitValues (& terminalFont -> font , fontName .chars , fontSize .chars );
420+ }
421+
404422static void detectUrxvt (FFTerminalFontResult * terminalFont ) {
405423 FF_STRBUF_AUTO_DESTROY buffer = ffStrbufCreate ();
406424
@@ -522,6 +540,8 @@ ffDetectTerminalFontPlatform
522540 detectWarp (terminalFont );
523541 } else if (ffStrbufIgnCaseEqualS (& terminal -> processName , "weston-terminal" )) {
524542 detectWestonTerminal (terminalFont );
543+ } else if (ffStrbufIgnCaseEqualS (& terminal -> processName , "kmscon" )) {
544+ detectKmscon (terminalFont );
525545 } else if (ffStrbufStartsWithIgnCaseS (& terminal -> processName , "terminator" )) {
526546 detectTerminator (terminalFont );
527547 } else if (ffStrbufStartsWithIgnCaseS (& terminal -> processName , "sakura" )) {
0 commit comments