From 2e9a7612751000bd57b81100c99ff0ba06cafa38 Mon Sep 17 00:00:00 2001 From: jao Date: Tue, 13 Sep 2022 05:44:29 +0100 Subject: 'Core' fonts not used anymore (utf8 is always required) --- src/Xmobar/X11/XlibDraw.hs | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) (limited to 'src/Xmobar/X11/XlibDraw.hs') diff --git a/src/Xmobar/X11/XlibDraw.hs b/src/Xmobar/X11/XlibDraw.hs index 9a005e8..d1432f8 100644 --- a/src/Xmobar/X11/XlibDraw.hs +++ b/src/Xmobar/X11/XlibDraw.hs @@ -81,31 +81,17 @@ verticalOffset ht (Icon _) _ _ conf | otherwise = return $ fi (ht `div` 2) - 1 verticalOffset _ (Hspace _) _ voffs _ = return $ fi voffs -printString :: Display - -> Drawable - -> XFont - -> GC - -> String - -> String - -> Position - -> Position - -> Position - -> Position - -> String - -> Int +printString :: Display -> Drawable -> XFont -> GC + -> String -> String + -> Position -> Position -> Position -> Position + -> String -> Int -> IO () -printString d p (Core fs) gc fc bc x y _ _ s a = do - setFont d gc $ fontFromFontStruct fs - withColors d [fc, bc] $ \[fc', bc'] -> do - setForeground d gc fc' - when (a == 255) (setBackground d gc bc') - drawImageString d p gc x y s -printString d p (Utf8 fs) gc fc bc x y _ _ s a = - withColors d [fc, bc] $ \[fc', bc'] -> do - setForeground d gc fc' - when (a == 255) (setBackground d gc bc') - liftIO $ wcDrawImageString d p fs gc x y s +printString d p fs gc fc bc x y _ _ s a = + withColors d [fc, bc] $ \[fc', bc'] -> do + setForeground d gc fc' + when (a == 255) (setBackground d gc bc') + liftIO $ wcDrawImageString d p fs gc x y s -- | An easy way to print the stuff we need to print printStrings :: Drawable -- cgit v1.2.3