You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
baked->Ascent = (float)FT_CEIL(metrics.ascender) * scale; // The pixel extents above the baseline in pixels (typically positive).
459
-
baked->Descent = (float)FT_CEIL(metrics.descender) * scale; // The extents below the baseline in pixels (typically negative).
460
-
baked->LineHeight = baked->Size; //(float)FT_CEIL(metrics.height) * scale; // The baseline-to-baseline distance. Note that it usually is larger than the sum of the ascender and descender taken as absolute values. There is also no guarantee that no glyphs extend above or below subsequent baselines when using this distance. Think of it as a value the designer of the font finds appropriate.
461
-
//LineGap = (float)FT_CEIL(metrics.height - metrics.ascender + metrics.descender) * scale; // The spacing in pixels between one row's descent and the next row's ascent.
458
+
baked->Ascent = (float)FT_CEIL(metrics.ascender) * scale;// The pixel extents above the baseline in pixels (typically positive).
459
+
baked->Descent = (float)(metrics.descender >> 6) * scale;// The extents below the baseline in pixels (typically negative).
460
+
//FreeType rounds metrics.height when GRID_FIT_METRICS is defined which may undesirably be 1px smaller than Ascent-Descent
461
+
baked->LineHeight = src->SizePixels > 0.0f ? baked->Size : (float)FT_CEIL(FT_MulFix(bd_font_data->FtFace->height, metrics.y_scale)) * scale; // The baseline-to-baseline distance. Note that it usually is larger than the sum of the ascender and descender taken as absolute values. There is also no guarantee that no glyphs extend above or below subsequent baselines when using this distance. Think of it as a value the designer of the font finds appropriate.
462
462
//MaxAdvanceWidth = (float)FT_CEIL(metrics.max_advance) * scale; // This field gives the maximum horizontal cursor advance for all glyphs in the font.
0 commit comments