| |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Contents | |||||||||||||||||||||||||
Description | |||||||||||||||||||||||||
Fonts. | |||||||||||||||||||||||||
Synopsis | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Fonts | |||||||||||||||||||||||||
createFont :: FontDef -> IO Font | |||||||||||||||||||||||||
Create a new font from a font definition. | |||||||||||||||||||||||||
defaultFont :: Font | |||||||||||||||||||||||||
The default window font. | |||||||||||||||||||||||||
Metrics (on a certain canvas). | |||||||||||||||||||||||||
getFontMetrics :: Font -> CanvasHandle -> IO FontMetrics | |||||||||||||||||||||||||
Get the font metrics of a specified font. | |||||||||||||||||||||||||
getFontCharWidth :: Font -> Char -> CanvasHandle -> IO Int | |||||||||||||||||||||||||
Get the pixel width of a character. | |||||||||||||||||||||||||
getFontStringWidth :: Font -> String -> CanvasHandle -> IO Int | |||||||||||||||||||||||||
Get the pixel width of a string. | |||||||||||||||||||||||||
Enumerate fonts | |||||||||||||||||||||||||
getFontNames :: IO [FontName] | |||||||||||||||||||||||||
Enumerate all the available font names. | |||||||||||||||||||||||||
getFontVariants :: FontName -> FontSize -> FontSize -> IO (FiniteMap (FontWeight, FontStyle) [FontSize]) | |||||||||||||||||||||||||
The expression (getFontVariants fontname min max) returns all avaiable font definitions where the font name is fontname and the font size is between min and max (inclusive). The keys in the returned map are all posible combinations between weight and style, and the value coresponding to them in the map is a list of sizes for which this combination is available. | |||||||||||||||||||||||||
Standard font definitions. | |||||||||||||||||||||||||
defaultFontDef :: FontDef | |||||||||||||||||||||||||
serifFontDef :: FontDef | |||||||||||||||||||||||||
sansSerifFontDef :: FontDef | |||||||||||||||||||||||||
nonProportionalFontDef :: FontDef | |||||||||||||||||||||||||
smallFontDef :: FontDef | |||||||||||||||||||||||||
symbolFontDef :: FontDef | |||||||||||||||||||||||||
Produced by Haddock version 0.4 |