MCPcopy Create free account
hub / github.com/Wemino/EchoPatch / AddCustomRectFontGlyph

Method AddCustomRectFontGlyph

include/imgui/imgui_draw.cpp:3347–3351  ·  view source on GitHub ↗

This API does not make sense anymore with scalable fonts. - Prefer adding a font source (ImFontConfig) using a custom/procedural loader. - You may use ImFontFlags_LockBakedSizes to limit an existing font to known baked sizes: ImFont* myfont = io.Fonts->AddFontFromFileTTF(....); myfont->GetFontBaked(16.0f); myfont->Flags |= ImFontFlags_LockBakedSizes;

Source from the content-addressed store, hash-verified

3345// myfont->GetFontBaked(16.0f);
3346// myfont->Flags |= ImFontFlags_LockBakedSizes;
3347ImFontAtlasRectId ImFontAtlas::AddCustomRectFontGlyph(ImFont* font, ImWchar codepoint, int width, int height, float advance_x, const ImVec2& offset)
3348{
3349 float font_size = font->LegacySize;
3350 return AddCustomRectFontGlyphForSize(font, font_size, codepoint, width, height, advance_x, offset);
3351}
3352// FIXME: we automatically set glyph.Colored=true by default.
3353// If you need to alter this, you can write 'font->Glyphs.back()->Colored' after calling AddCustomRectFontGlyph().
3354ImFontAtlasRectId ImFontAtlas::AddCustomRectFontGlyphForSize(ImFont* font, float font_size, ImWchar codepoint, int width, int height, float advance_x, const ImVec2& offset)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected