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;
| 3345 | // myfont->GetFontBaked(16.0f); |
| 3346 | // myfont->Flags |= ImFontFlags_LockBakedSizes; |
| 3347 | ImFontAtlasRectId 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(). |
| 3354 | ImFontAtlasRectId ImFontAtlas::AddCustomRectFontGlyphForSize(ImFont* font, float font_size, ImWchar codepoint, int width, int height, float advance_x, const ImVec2& offset) |
nothing calls this directly
no outgoing calls
no test coverage detected