HGL-3.2.3.1: A simple graphics library based on X11 or Win32

Copyright(c) Alastair Reid, 1999-2003
LicenseBSD-style (see the file libraries/base/LICENSE)
Maintainerlibraries@haskell.org
Stabilityprovisional
Portabilitynon-portable (requires concurrency)
Safe HaskellNone
LanguageHaskell98

Graphics.HGL.Draw.Font

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

Documentation

createFont Source

Arguments

:: Size

size of character glyphs in pixels

-> Angle

rotation angle

-> Bool

bold font?

-> Bool

italic font?

-> String

font 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 () Source

Delete a font created with createFont.

selectFont :: Font -> Draw Font Source

Set the font for subsequent text, and return the previous font.

mkFont Source

Arguments

:: Size

size of character glyphs in pixels

-> Angle

rotation angle

-> Bool

bold font?

-> Bool

italic font?

-> String

font 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).