Collection Info

View Source
Collection
vendor
Path
fontstash
Entries
52

Source Files

Constants

8

Types

12

Glyph_Index #

Source
Glyph_Index :: i32

in case you want to change the handle for glyph indices

Procedures

31

AddFontMem #

Source
AddFontMem :: proc(ctx: ^FontContext, name: string, data: []u8, freeLoadedData: bool, fontIndex: int = 0) -> int {…}

push a font to the font stack optionally init with ascii characters at a wanted size 'fontIndex' controls which font you want to load within a multi-font format such as TTC. Leave it as zero if you are loading a single-font format such as TTF.

AddFontPath #

Source
AddFontPath :: proc(ctx: ^FontContext, name: string, path: string, fontIndex: int = 0) -> int {…}

'fontIndex' controls which font you want to load within a multi-font format such as TTC. Leave it as zero if you are loading a single-font format such as TTF.

CodepointWidth #

Source
CodepointWidth :: proc(font: ^Font, codepoint: rune, scale: f32) -> f32 {…}

only useful for single glyphs where you quickly want the width

EndState #

Source
EndState :: proc(using ctx: ^FontContext) {…}

checks for texture updates after potential __getGlyph calls

PushState #

Source
PushState :: proc(using ctx: ^FontContext, loc := #caller_location) {…}

push a state, copies the current one over to the next one

ValidateTexture #

Source
ValidateTexture :: proc(using ctx: ^FontContext, dirty: ^[4]f32) -> bool {…}

true when the dirty rectangle is valid and needs a texture update on the gpu

Procedure Groups

1