dear-imgui-2.3.0: Haskell bindings for Dear ImGui.
Safe HaskellSafe-Inferred
LanguageHaskell2010

DearImGui.Raw.Font

Description

Fonts

It includes default atlas management, font configuration and glyph ranges.

Synopsis

Types

newtype Font Source #

Font runtime data handle

Wraps ImFont*.

Constructors

Font (Ptr ImFont) 

newtype GlyphRanges Source #

Glyph ranges handle

Wraps ImWchar*.

Constructors

GlyphRanges (Ptr ImWchar) 

Adding fonts

addFontDefault Source #

Arguments

:: MonadIO m 
=> m Font

Returns font handle for future usage

Add the default font (ProggyClean.ttf, 13 px) to the atlas.

addFontFromFileTTF Source #

Arguments

:: MonadIO m 
=> CString

Font file path

-> CFloat

Font size in pixels

-> FontConfig

Configuration data

-> GlyphRanges

Glyph ranges to use

-> m Font

Returns font handle for future usage

Add a custom OTF/TTF font from a file.

addFontFromMemoryTTF :: MonadIO m => CStringLen -> CFloat -> FontConfig -> GlyphRanges -> m Font Source #

Transfer a buffer with TTF data to font atlas builder.

Using fonts

pushFont :: MonadIO m => Font -> m () Source #

Pushes a font into the parameters stack, so ImGui would render following text using it.

popFont :: MonadIO m => m () Source #

Pops a font pushed into the parameters stack

Should be called only after a corresponding pushFont call.

Atlas management

clearFontAtlas :: MonadIO m => m () Source #

Clear all font atlas input and output data

buildFontAtlas :: MonadIO m => m () Source #

Explicitly build pixels data for the atlas.