[CTL] Fix scaling of the underline position and size.
This commit is contained in:
parent
d78336c65e
commit
2f391bd9c3
2 changed files with 5 additions and 4 deletions
|
@ -124,8 +124,8 @@ DynamicFontDataAdvanced::DataAtSize *DynamicFontDataAdvanced::get_data_for_size(
|
|||
fds->size = p_size;
|
||||
fds->ascent = (fds->face->size->metrics.ascender / 64.0) / oversampling * fds->scale_color_font;
|
||||
fds->descent = (-fds->face->size->metrics.descender / 64.0) / oversampling * fds->scale_color_font;
|
||||
fds->underline_position = -fds->face->underline_position / 64.0 / oversampling * fds->scale_color_font;
|
||||
fds->underline_thickness = fds->face->underline_thickness / 64.0 / oversampling * fds->scale_color_font;
|
||||
fds->underline_position = (-FT_MulFix(fds->face->underline_position, fds->face->size->metrics.y_scale) / 64.0) / oversampling * fds->scale_color_font;
|
||||
fds->underline_thickness = (FT_MulFix(fds->face->underline_thickness, fds->face->size->metrics.y_scale) / 64.0) / oversampling * fds->scale_color_font;
|
||||
|
||||
//Load os2 TTF pable
|
||||
fds->os2 = (TT_OS2 *)FT_Get_Sfnt_Table(fds->face, FT_SFNT_OS2);
|
||||
|
|
|
@ -124,8 +124,9 @@ DynamicFontDataFallback::DataAtSize *DynamicFontDataFallback::get_data_for_size(
|
|||
fds->size = p_size;
|
||||
fds->ascent = (fds->face->size->metrics.ascender / 64.0) / oversampling * fds->scale_color_font;
|
||||
fds->descent = (-fds->face->size->metrics.descender / 64.0) / oversampling * fds->scale_color_font;
|
||||
fds->underline_position = -fds->face->underline_position / 64.0 / oversampling * fds->scale_color_font;
|
||||
fds->underline_thickness = fds->face->underline_thickness / 64.0 / oversampling * fds->scale_color_font;
|
||||
fds->underline_position = (-FT_MulFix(fds->face->underline_position, fds->face->size->metrics.y_scale) / 64.0) / oversampling * fds->scale_color_font;
|
||||
fds->underline_thickness = (FT_MulFix(fds->face->underline_thickness, fds->face->size->metrics.y_scale) / 64.0) / oversampling * fds->scale_color_font;
|
||||
|
||||
if (p_outline_size != 0) {
|
||||
size_cache_outline[id] = fds;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue