mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-14 07:43:30 +00:00
Revert "Fonts: avoid baking ExtraSizeScale twice into Ascent/Descent."
This reverts commit 1bcc23ef12.
This commit is contained in:
@@ -4699,7 +4699,7 @@ static bool ImGui_ImplStbTrueType_FontBakedInit(ImFontAtlas* atlas, ImFontConfig
|
||||
{
|
||||
// FIXME-NEWFONTS: reevaluate how to use sizing metrics
|
||||
// FIXME-NEWFONTS: make use of line gap value
|
||||
float scale_for_layout = bd_font_data->ScaleFactor * baked->Size / src->ExtraSizeScale;
|
||||
float scale_for_layout = bd_font_data->ScaleFactor * baked->Size;
|
||||
int unscaled_ascent, unscaled_descent, unscaled_line_gap;
|
||||
stbtt_GetFontVMetrics(&bd_font_data->FontInfo, &unscaled_ascent, &unscaled_descent, &unscaled_line_gap);
|
||||
baked->Ascent = ImCeil(unscaled_ascent * scale_for_layout);
|
||||
|
||||
Reference in New Issue
Block a user