diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-02-14 13:49:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-14 13:49:14 +0100 |
commit | cdfd3ffe15dbf6f41bdade308d69a75f3d4eb3a7 (patch) | |
tree | c99de3fd861139b3b18073605b2ee97f783f0329 /modules | |
parent | 6fb1ed2bca09e88509608a761b0ce300dd997c19 (diff) | |
parent | 1f60ac1e08ddec42e416b9fad6ed646999857b59 (diff) |
Merge pull request #44747 from bruvzg/missing_outlines
[CTL] Add missing theme properties for outlines, fix underline scaling, and RTL cell padding.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/text_server_adv/dynamic_font_adv.cpp | 4 | ||||
-rw-r--r-- | modules/text_server_fb/dynamic_font_fb.cpp | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/modules/text_server_adv/dynamic_font_adv.cpp b/modules/text_server_adv/dynamic_font_adv.cpp index 5a16158c0f..fd47f58480 100644 --- a/modules/text_server_adv/dynamic_font_adv.cpp +++ b/modules/text_server_adv/dynamic_font_adv.cpp @@ -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); diff --git a/modules/text_server_fb/dynamic_font_fb.cpp b/modules/text_server_fb/dynamic_font_fb.cpp index df7756cbd0..6836d2b9e2 100644 --- a/modules/text_server_fb/dynamic_font_fb.cpp +++ b/modules/text_server_fb/dynamic_font_fb.cpp @@ -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 { |