MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / ImFontBuildSrcData

Class ImFontBuildSrcData

KBotExt/imgui/imgui_draw.cpp:2356–2368  ·  view source on GitHub ↗

Temporary data for one source font (multiple source fonts can be merged into one destination ImFont) (C++03 doesn't allow instancing ImVector<> with function-local types so we declare the type here.)

Source from the content-addressed store, hash-verified

2354// Temporary data for one source font (multiple source fonts can be merged into one destination ImFont)
2355// (C++03 doesn't allow instancing ImVector<> with function-local types so we declare the type here.)
2356struct ImFontBuildSrcData
2357{
2358 stbtt_fontinfo FontInfo;
2359 stbtt_pack_range PackRange; // Hold the list of codepoints to pack (essentially points to Codepoints.Data)
2360 stbrp_rect* Rects; // Rectangle to pack. We first fill in their size and the packer will give us their position.
2361 stbtt_packedchar* PackedChars; // Output glyphs
2362 const ImWchar* SrcRanges; // Ranges as requested by user (user is allowed to request too much, e.g. 0x0020..0xFFFF)
2363 int DstIndex; // Index into atlas->Fonts[] and dst_tmp_array[]
2364 int GlyphsHighest; // Highest requested codepoint
2365 int GlyphsCount; // Glyph count (excluding missing glyphs and glyphs already set by an earlier source font)
2366 ImBitVector GlyphsSet; // Glyph bit map (random access, 1-bit per codepoint. This will be a maximum of 8KB)
2367 ImVector<int> GlyphsList; // Glyph codepoints list (flattened version of GlyphsSet)
2368};
2369
2370// Temporary data for one destination ImFont* (multiple source fonts can be merged into one destination ImFont)
2371struct ImFontBuildDstData

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected