SFML-2.3.2.4: SFML bindings

Safe HaskellNone
LanguageHaskell98

SFML.Graphics.Font

Synopsis

Documentation

module SFML.Utils

fontFromFile :: FilePath -> IO (Either SFException 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 SFException Font) 

Create a new image font a file in memory.

fontFromStream :: InputStream -> IO (Either SFException 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 Float 

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 Float 

Get the line spacing value.

getUnderlinePosition Source

Arguments

:: Font

Source font

-> Int

Reference character size

-> IO Float 

Get the position of the underline.

Underline position is the vertical offset to apply between the baseline and the underline.

getUnderlineThickness Source

Arguments

:: Font

Source font

-> Int

Reference character size

-> IO Float 

Get the thickness of the underline.

Underline thickness is the vertical size of the underline.

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.

getInfo :: Font -> IO FontInfo Source

Get the font information.

The returned structure will remain valid only if the font is still valid. If the font is invalid an invalid structure is returned.