xmonad-contrib-0.18.0.9: Community-maintained extensions for xmonad
Copyright(c) 2007 Andrea Rossato and Spencer Janssen
LicenseBSD-style (see xmonad/LICENSE)
Maintainerandrea.rossato@unibz.it
Stabilityunstable
Portabilityunportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

XMonad.Util.Font

Contents

Description

A module for abstracting a font facility over Core fonts and Xft

Synopsis

Usage:

See XMonad.Layout.Tabbed or XMonad.Prompt for usage examples

initXMF :: String -> X XMonadFont Source #

When initXMF gets a font name that starts with 'xft:' it switches to the Xft backend Example: 'xft: Sans-10'

initCoreFont :: String -> X FontStruct Source #

Given a fontname returns the font structure. If the font name is not valid the default font will be loaded and returned.

data Align Source #

String position

Instances

Instances details
Read Align Source # 
Instance details

Defined in XMonad.Util.Font

Show Align Source # 
Instance details

Defined in XMonad.Util.Font

Methods

showsPrec :: Int -> Align -> ShowS #

show :: Align -> String #

showList :: [Align] -> ShowS #

stringPosition :: (Functor m, MonadIO m) => Display -> XMonadFont -> Rectangle -> Align -> String -> m (Position, Position) Source #

Return the string x and y Position in a Rectangle, given a FontStruct and the Alignment

stringToPixel :: (Functor m, MonadIO m) => Display -> String -> m Pixel Source #

Get the Pixel value for a named color: if an invalid name is given the black pixel will be returned.

pixelToString :: MonadIO m => Display -> Pixel -> m String Source #

Convert a Pixel into a String.

This function removes any alpha channel from the Pixel, because X11 mishandles alpha channels and produces black.

fi :: (Integral a, Num b) => a -> b Source #

Short for fromIntegral.