SFML-0.2.0.0: SFML bindings

Safe HaskellNone
LanguageHaskell98

SFML.Graphics.Font

Synopsis

Documentation

module SFML.Utils

fontFromFile :: FilePath -> IO (Either FontException Font) Source

Create a new font from a file.

fontFromMemory Source

Arguments

:: Ptr Char

Pointer to the file data in memory

-> Int

Size of the data to load, in bytes

-> IO (Either FontException Font) 

Create a new image font a file in memory.

fontFromStream :: InputStream -> IO (Either FontException Font) Source

Create a new image font a custom stream.

copy :: SFCopyable a => a -> IO a Source

Copy the given SFML resource.

destroy :: SFResource a => a -> IO () Source

Destroy the given SFML resource.

getGlyph Source

Arguments

:: Font

Source font

-> Int

Unicode code point of the character to get

-> Int

Character size, in pixels

-> Bool

Retrieve the bold version or the regular one?

-> IO Glyph 

Get a glyph in a font.

getKerning Source

Arguments

:: Font

Source font

-> Int

Unicode code point of the first character

-> Int

Unicode code point of the second characte.r

-> Int

Character size, in pixels

-> IO Int 

Get the kerning value corresponding to a given pair of characters in a font.

getLineSpacing Source

Arguments

:: Font

Source font

-> Int

Character size, in pixels

-> IO Int 

Get the line spacing value.

getFontTexture Source

Arguments

:: Font

Source font

-> Int

Character size, in pixels

-> IO Texture 

Get the texture containing the glyphs of a given size in a font.