xmonad-contrib-0.6: Third party extensions for xmonadSource codeContentsIndex
XMonad.Util.Font
Portabilityunportable
Stabilityunstable
Maintainerandrea.rossato@unibz.it
Contents
Usage:
Description
A module for abstracting a font facility over Core fonts and Xft
Synopsis
data XMonadFont
= Core FontStruct
| Xft XftFont
initXMF :: String -> X XMonadFont
releaseXMF :: XMonadFont -> X ()
initCoreFont :: String -> X FontStruct
releaseCoreFont :: FontStruct -> X ()
data Align
= AlignCenter
| AlignRight
| AlignLeft
stringPosition :: XMonadFont -> Rectangle -> Align -> String -> X (Position, Position)
textWidthXMF :: MonadIO m => Display -> XMonadFont -> String -> m Int
textExtentsXMF :: MonadIO m => XMonadFont -> String -> m (FontDirection, Int32, Int32, CharStruct)
printStringXMF :: MonadIO m => Display -> Drawable -> XMonadFont -> GC -> String -> String -> Position -> Position -> String -> m ()
stringToPixel :: MonadIO m => Display -> String -> m Pixel
Usage:
See Xmonad.Layout.Tabbed or XMonad.Prompt for usage examples
data XMonadFont Source
Constructors
Core FontStruct
Xft XftFont
initXMF :: String -> X XMonadFontSource
When initXMF gets a font name that starts with 'xft:' it switchs to the Xft backend Example: 'xft: Sans-10'
releaseXMF :: XMonadFont -> X ()Source
initCoreFont :: String -> X FontStructSource
Given a fontname returns the font structure. If the font name is not valid the default font will be loaded and returned.
releaseCoreFont :: FontStruct -> X ()Source
data Align Source
String position
Constructors
AlignCenter
AlignRight
AlignLeft
stringPosition :: XMonadFont -> Rectangle -> Align -> String -> X (Position, Position)Source
Return the string x and y Position in a Rectangle, given a FontStruct and the Alignment
textWidthXMF :: MonadIO m => Display -> XMonadFont -> String -> m IntSource
textExtentsXMF :: MonadIO m => XMonadFont -> String -> m (FontDirection, Int32, Int32, CharStruct)Source
printStringXMF :: MonadIO m => Display -> Drawable -> XMonadFont -> GC -> String -> String -> Position -> Position -> String -> m ()Source
stringToPixel :: MonadIO m => Display -> String -> m PixelSource
Get the Pixel value for a named color: if an invalid name is given the black pixel will be returned.
Produced by Haddock version 2.3.0