mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 04:31:52 -07:00
Use XFT fonts if available
The silent error `user error (createFontSet)` would break certain modules (like the prompt) by simply not showing anything. Pango 1.44 dropped support for FreeType in favor of HarfBuzz, losing support for traditional BDF/PCF bitmap fonts. Hence, some distributions don't ship `xorg-fonts-misc` anymore. Fixes https://github.com/xmonad/xmonad-contrib/issues/348
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
{-# LANGUAGE MultiWayIf #-}
|
||||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# LANGUAGE ExistentialQuantification #-}
|
||||
{-# LANGUAGE CPP #-}
|
||||
-----------------------------------------------------------------------------
|
||||
-- |
|
||||
-- Module : XMonad.Prompt
|
||||
@@ -310,7 +311,11 @@ instance Default XPColor where
|
||||
|
||||
instance Default XPConfig where
|
||||
def =
|
||||
#ifdef XFT
|
||||
XPC { font = "xft:monospace-12"
|
||||
#else
|
||||
XPC { font = "-misc-fixed-*-*-*-*-12-*-*-*-*-*-*-*"
|
||||
#endif
|
||||
, bgColor = bgNormal def
|
||||
, fgColor = fgNormal def
|
||||
, bgHLight = bgHighlight def
|
||||
|
Reference in New Issue
Block a user