ImFont: DisplayOffset.y defaults to 0 instead of +1.

This commit is contained in:
omar
2018-02-15 10:46:28 +01:00
parent 024e23c4d7
commit 30c469f7c5
3 changed files with 4 additions and 2 deletions

View File

@ -1522,6 +1522,7 @@ ImFont* ImFontAtlas::AddFontDefault(const ImFontConfig* font_cfg_template)
const char* ttf_compressed_base85 = GetDefaultCompressedFontDataTTFBase85();
ImFont* font = AddFontFromMemoryCompressedBase85TTF(ttf_compressed_base85, font_cfg.SizePixels, &font_cfg, GetGlyphRangesDefault());
font->DisplayOffset.y = 1.0f;
return font;
}
@ -2133,7 +2134,7 @@ ImFont::ImFont()
{
Scale = 1.0f;
FallbackChar = (ImWchar)'?';
DisplayOffset = ImVec2(0.0f, 1.0f);
DisplayOffset = ImVec2(0.0f, 0.0f);
ClearOutputData();
}