sdl2-ttf-2.1.0: Bindings to SDL2_ttf.

Copyright(c) 2015 Siniša Biđin
LicenseMIT
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

SDL.Raw.Font

Contents

Description

Raw bindings to the SDL2_ttf library. No error-handling is done here. For more information about specific function behaviour, see the SDL2_ttf documentation.

Synopsis

General

init :: forall m. MonadIO m => m CInt #

wasInit :: forall m. MonadIO m => m CInt #

quit :: forall m. MonadIO m => m () #

getVersion :: forall m. MonadIO m => m (Ptr Version) #

Loading fonts

data Font #

The raw, underlying TTF_Font struct.

type FontPath = CString #

A path to a font file.

type PointSize = CInt #

Point size (based on 72DPI). Translates to pixel height.

type Free = CInt #

Should the Ptr RWops be freed after an operation? 1 for yes, 0 for no.

type Index = CLong #

Indicates the font face we're loading. First face is always 0.

closeFont :: MonadIO m => Ptr Font -> m () #

Font attributes

setFontStyle :: MonadIO m => Ptr Font -> CInt -> m () #

pattern TTF_STYLE_NORMAL :: forall a. (Eq a, Num a) => a #

pattern TTF_STYLE_BOLD :: forall a. (Eq a, Num a) => a #

pattern TTF_STYLE_ITALIC :: forall a. (Eq a, Num a) => a #

pattern TTF_STYLE_UNDERLINE :: forall a. (Eq a, Num a) => a #

pattern TTF_STYLE_STRIKETHROUGH :: forall a. (Eq a, Num a) => a #

setFontOutline :: MonadIO m => Ptr Font -> CInt -> m () #

setFontHinting :: MonadIO m => Ptr Font -> CInt -> m () #

pattern TTF_HINTING_NORMAL :: forall a. (Eq a, Num a) => a #

pattern TTF_HINTING_LIGHT :: forall a. (Eq a, Num a) => a #

pattern TTF_HINTING_MONO :: forall a. (Eq a, Num a) => a #

pattern TTF_HINTING_NONE :: forall a. (Eq a, Num a) => a #

setFontKerning :: MonadIO m => Ptr Font -> CInt -> m () #

Getting text size

sizeText :: MonadIO m => Ptr Font -> CString -> Ptr CInt -> Ptr CInt -> m CInt #

sizeUTF8 :: MonadIO m => Ptr Font -> CString -> Ptr CInt -> Ptr CInt -> m CInt #

Rendering text

Other

pattern UNICODE_BOM_NATIVE :: forall a. (Eq a, Num a) => a #

pattern UNICODE_BOM_SWAPPED :: forall a. (Eq a, Num a) => a #