mirror of
https://github.com/ocornut/imgui.git
synced 2026-04-21 14:55:36 +00:00
Fonts: ImFont::DefaultSize -> ImFont::LegacySize. ImFontFlags_UseDefaultSize -> ImFontFlags_DefaultToLegacySize.
This commit is contained in:
@@ -3004,7 +3004,7 @@ ImFont* ImFontAtlas::AddFont(const ImFontConfig* font_cfg_in)
|
||||
font = IM_NEW(ImFont)();
|
||||
font->FontId = FontNextUniqueID++;
|
||||
font->Flags = font_cfg_in->Flags;
|
||||
font->DefaultSize = font_cfg_in->SizePixels;
|
||||
font->LegacySize = font_cfg_in->SizePixels;
|
||||
font->CurrentRasterizerDensity = font_cfg_in->RasterizerDensity;
|
||||
Fonts.push_back(font);
|
||||
}
|
||||
@@ -3266,7 +3266,7 @@ void ImFontAtlas::RemoveCustomRect(ImFontAtlasRectId id)
|
||||
// myfont->Flags |= ImFontFlags_LockBakedSizes;
|
||||
ImFontAtlasRectId ImFontAtlas::AddCustomRectFontGlyph(ImFont* font, ImWchar codepoint, int width, int height, float advance_x, const ImVec2& offset)
|
||||
{
|
||||
float font_size = font->DefaultSize;
|
||||
float font_size = font->LegacySize;
|
||||
return AddCustomRectFontGlyphForSize(font, font_size, codepoint, width, height, advance_x, offset);
|
||||
}
|
||||
// FIXME: we automatically set glyph.Colored=true by default.
|
||||
|
||||
Reference in New Issue
Block a user