| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
SFML.Graphics.Font
- module SFML.Utils
- data FontException = FontException String
- fontFromFile :: FilePath -> IO (Either FontException Font)
- fontFromMemory :: Ptr Char -> Int -> IO (Either FontException Font)
- fontFromStream :: InputStream -> IO (Either FontException Font)
- copy :: SFCopyable a => a -> IO a
- destroy :: SFResource a => a -> IO ()
- getGlyph :: Font -> Int -> Int -> Bool -> IO Glyph
- getKerning :: Font -> Int -> Int -> Int -> IO Int
- getLineSpacing :: Font -> Int -> IO Int
- getFontTexture :: Font -> Int -> IO Texture
Documentation
module SFML.Utils
fontFromFile :: FilePath -> IO (Either FontException Font) Source
Create a new font from a file.
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.
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.
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.
Get the line spacing value.