Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Bindings to rtext
Synopsis
- getFontDefault :: IO Font
- loadFont :: String -> WindowResources -> IO Font
- loadFontEx :: String -> Int -> [Int] -> Int -> WindowResources -> IO Font
- loadFontFromImage :: Image -> Color -> Int -> WindowResources -> IO Font
- loadFontFromMemory :: String -> [Integer] -> Int -> [Int] -> Int -> WindowResources -> IO Font
- loadFontData :: [Integer] -> Int -> [Int] -> Int -> FontType -> IO GlyphInfo
- genImageFontAtlas :: [GlyphInfo] -> [[Rectangle]] -> Int -> Int -> Int -> Int -> IO Image
- unloadFont :: Font -> WindowResources -> IO ()
- isFontReady :: Font -> IO Bool
- exportFontAsCode :: Font -> String -> IO Bool
- drawFPS :: Int -> Int -> IO ()
- drawText :: String -> Int -> Int -> Int -> Color -> IO ()
- drawTextEx :: Font -> String -> Vector2 -> Float -> Float -> Color -> IO ()
- drawTextPro :: Font -> String -> Vector2 -> Vector2 -> Float -> Float -> Float -> Color -> IO ()
- drawTextCodepoint :: Font -> Int -> Vector2 -> Float -> Color -> IO ()
- drawTextCodepoints :: Font -> [Int] -> Vector2 -> Float -> Float -> Color -> IO ()
- setTextLineSpacing :: Int -> IO ()
- measureText :: String -> Int -> IO Int
- measureTextEx :: Font -> String -> Float -> Float -> IO Vector2
- getGlyphIndex :: Font -> Int -> IO Int
- getGlyphInfo :: Font -> Int -> IO GlyphInfo
- getGlyphAtlasRec :: Font -> Int -> IO Rectangle
- loadUTF8 :: [Integer] -> IO String
- loadCodepoints :: String -> IO [Int]
- getCodepointCount :: String -> IO Int
- getCodepointNext :: String -> IO (Int, Int)
- getCodepointPrevious :: String -> IO (Int, Int)
- codepointToUTF8 :: Int -> IO String
- c'getFontDefault :: IO (Ptr Font)
- c'loadFont :: CString -> IO (Ptr Font)
- c'loadFontEx :: CString -> CInt -> Ptr CInt -> CInt -> IO (Ptr Font)
- c'loadFontFromImage :: Ptr Image -> Ptr Color -> CInt -> IO (Ptr Font)
- c'loadFontFromMemory :: CString -> Ptr CUChar -> CInt -> CInt -> Ptr CInt -> CInt -> IO (Ptr Font)
- c'loadFontData :: Ptr CUChar -> CInt -> CInt -> Ptr CInt -> CInt -> CInt -> IO (Ptr GlyphInfo)
- c'genImageFontAtlas :: Ptr GlyphInfo -> Ptr (Ptr Rectangle) -> CInt -> CInt -> CInt -> CInt -> IO (Ptr Image)
- c'unloadFontData :: Ptr GlyphInfo -> CInt -> IO ()
- c'isFontReady :: Ptr Font -> IO CBool
- c'unloadFont :: Ptr Font -> IO ()
- c'exportFontAsCode :: Ptr Font -> CString -> IO CBool
- c'drawFPS :: CInt -> CInt -> IO ()
- c'drawText :: CString -> CInt -> CInt -> CInt -> Ptr Color -> IO ()
- c'drawTextEx :: Ptr Font -> CString -> Ptr Vector2 -> CFloat -> CFloat -> Ptr Color -> IO ()
- c'drawTextPro :: Ptr Font -> CString -> Ptr Vector2 -> Ptr Vector2 -> CFloat -> CFloat -> CFloat -> Ptr Color -> IO ()
- c'drawTextCodepoint :: Ptr Font -> CInt -> Ptr Vector2 -> CFloat -> Ptr Color -> IO ()
- c'drawTextCodepoints :: Ptr Font -> Ptr CInt -> CInt -> Ptr Vector2 -> CFloat -> CFloat -> Ptr Color -> IO ()
- c'setTextLineSpacing :: CInt -> IO ()
- c'measureText :: CString -> CInt -> IO CInt
- c'measureTextEx :: Ptr Font -> CString -> CFloat -> CFloat -> IO (Ptr Vector2)
- c'getGlyphIndex :: Ptr Font -> CInt -> IO CInt
- c'getGlyphInfo :: Ptr Font -> CInt -> IO (Ptr GlyphInfo)
- c'getGlyphAtlasRec :: Ptr Font -> CInt -> IO (Ptr Rectangle)
- c'loadUTF8 :: Ptr CInt -> CInt -> IO CString
- c'loadCodepoints :: CString -> Ptr CInt -> IO (Ptr CInt)
- c'getCodepointCount :: CString -> IO CInt
- c'getCodepointNext :: CString -> Ptr CInt -> IO CInt
- c'getCodepointPrevious :: CString -> Ptr CInt -> IO CInt
- c'codepointToUTF8 :: CInt -> Ptr CInt -> IO CString
High level
getFontDefault :: IO Font Source #
loadFontEx :: String -> Int -> [Int] -> Int -> WindowResources -> IO Font Source #
loadFontFromImage :: Image -> Color -> Int -> WindowResources -> IO Font Source #
loadFontFromMemory :: String -> [Integer] -> Int -> [Int] -> Int -> WindowResources -> IO Font Source #
unloadFont :: Font -> WindowResources -> IO () Source #
Unloads a font from GPU memory (VRAM). Fonts are automatically unloaded
when closeWindow
is called, so manually unloading fonts is not required.
In larger projects, you may want to manually unload fonts to avoid having
them in VRAM for too long.
drawTextPro :: Font -> String -> Vector2 -> Vector2 -> Float -> Float -> Float -> Color -> IO () Source #
setTextLineSpacing :: Int -> IO () Source #
Native
c'loadFontFromMemory :: CString -> Ptr CUChar -> CInt -> CInt -> Ptr CInt -> CInt -> IO (Ptr Font) Source #
c'loadFontData :: Ptr CUChar -> CInt -> CInt -> Ptr CInt -> CInt -> CInt -> IO (Ptr GlyphInfo) Source #
c'genImageFontAtlas :: Ptr GlyphInfo -> Ptr (Ptr Rectangle) -> CInt -> CInt -> CInt -> CInt -> IO (Ptr Image) Source #
c'drawTextEx :: Ptr Font -> CString -> Ptr Vector2 -> CFloat -> CFloat -> Ptr Color -> IO () Source #
c'drawTextPro :: Ptr Font -> CString -> Ptr Vector2 -> Ptr Vector2 -> CFloat -> CFloat -> CFloat -> Ptr Color -> IO () Source #
c'drawTextCodepoints :: Ptr Font -> Ptr CInt -> CInt -> Ptr Vector2 -> CFloat -> CFloat -> Ptr Color -> IO () Source #
c'setTextLineSpacing :: CInt -> IO () Source #