DVUI

Entry

Fields

#
face:if (impl == .FreeType) c.FT_Face else c.stbtt_fontinfo
if (impl == .FreeType) c.FT_Face else c.stbtt_fontinfo
name:[]const u8
[]const u8
scaleFactor:f32
f32
height:f32
f32
ascent:f32
f32
em_height:f32
f32
glyph_info:std.AutoHashMapUnmanaged(u32, GlyphInfo)
std.AutoHashMapUnmanaged(u32, GlyphInfo)
glyph_info_ascii:[ascii_size - ascii_start]GlyphInfo
[ascii_size - ascii_start]GlyphInfo
texture_atlas_cache:?Texture
?Texture

Functions

#
init

Load the underlying font at an integer size <= font.size (guaranteed to have a minimum pixel size of 1)

getTextureAtlas

This needs to be called before rendering of glyphs as the uv coordinates

glyphInfoGetOrReplacement

If a codepoint is missing in the font it gets the glyph for

textSizeRaw

Doesn't scale the font or max_width, always stops at newlines