Safe Haskell | None |
---|---|
Language | Haskell98 |
SFML.Graphics.Font
- module SFML.Utils
- fontFromFile :: FilePath -> IO (Either SFException Font)
- fontFromMemory :: Ptr Char -> Int -> IO (Either SFException Font)
- fontFromStream :: InputStream -> IO (Either SFException 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 Float
- getLineSpacing :: Font -> Int -> IO Float
- getUnderlinePosition :: Font -> Int -> IO Float
- getUnderlineThickness :: Font -> Int -> IO Float
- getFontTexture :: Font -> Int -> IO Texture
- getInfo :: Font -> IO FontInfo
Documentation
module SFML.Utils
fontFromFile :: FilePath -> IO (Either SFException Font)
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 SFException Font) |
Create a new image font a file in memory.
fontFromStream :: InputStream -> IO (Either SFException Font)
Create a new image font a custom stream.
copy :: SFCopyable a => a -> IO a
Copy the given SFML resource.
destroy :: SFResource a => a -> IO ()
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 Float |
Get the kerning value corresponding to a given pair of characters in a font.
Get the line spacing value.
Get the position of the underline.
Underline position is the vertical offset to apply between the baseline and the underline.
Get the thickness of the underline.
Underline thickness is the vertical size of the underline.
Get the texture containing the glyphs of a given size in a font.