Graphics Libraries (HGL package)ContentsIndex
Graphics.HGL.Draw.Font
Portabilitynon-portable (requires concurrency)
Stabilityprovisional
Maintainerlibraries@haskell.org
Description

Text fonts.

Portability notes:

  • X11 does not directly support font rotation so createFont and mkFont always ignore the rotation angle argument in the X11 implementation of this library.
  • Many of the font families typically available on Win32 are not available on X11 (and vice-versa). In our experience, the font families courier, helvetica and times are somewhat portable.
Synopsis
data Font
createFont :: Size -> Angle -> Bool -> Bool -> String -> IO Font
deleteFont :: Font -> IO ()
selectFont :: Font -> Draw Font
mkFont :: Size -> Angle -> Bool -> Bool -> String -> (Font -> Draw a) -> Draw a
Documentation
data Font
createFont
:: Sizesize of character glyphs in pixels
-> Anglerotation angle
-> Boolbold font?
-> Boolitalic font?
-> Stringfont family
-> IO Font
Create a font. The rotation angle is ignored if the font is not a "TrueType" font (e.g., a System font on Win32).
deleteFont :: Font -> IO ()
Delete a font created with createFont.
selectFont :: Font -> Draw Font
Set the font for subsequent text, and return the previous font.
mkFont
:: Sizesize of character glyphs in pixels
-> Anglerotation angle
-> Boolbold font?
-> Boolitalic font?
-> Stringfont family
-> (Font -> Draw a)
-> Draw a
Generate a font for use in a drawing, and delete it afterwards. The rotation angle is ignored if the font is not a "TrueType" font (e.g., a System font on Win32).
Produced by Haddock version 0.7