helm-0.7.0: A functionally reactive game engine.

Safe HaskellNone

FRP.Helm.Text

Contents

Description

Contains all the data structures and functions for composing pieces of formatted text.

Synopsis

Elements

plainText :: String -> ElementSource

Creates a text element from a string.

asText :: Show a => a -> ElementSource

Creates a text element from any showable type, defaulting to the monospace typeface.

text :: Text -> ElementSource

Creates an element from a text.

Composing

defaultText :: TextSource

Creates the default text. By default the text is black sans-serif with a height of 14pt.

toText :: String -> TextSource

Creates a text from a string.

Formatting

light :: Text -> TextSource

Sets the weight of a piece of text to light.

bold :: Text -> TextSource

Sets the weight of a piece of text to bold.

italic :: Text -> TextSource

Sets the slant of a piece of text to italic.

oblique :: Text -> TextSource

Sets the slant of a piece of text to oblique.

color :: Color -> Text -> TextSource

Sets the color of a piece of text.

monospace :: Text -> TextSource

Sets the typeface of the text to monospace.

typeface :: String -> Text -> TextSource

Sets the typeface of the text.

header :: Text -> TextSource

Sets the size of a text noticeably large.

height :: Double -> Text -> TextSource

Sets the size of a piece of text.