[vlc-commits] Freetype: use FT_Glyph_Stroke to create outlines

Salah-Eddin Shaban git at videolan.org
Wed May 26 13:46:03 UTC 2021


vlc/vlc-3.0 | branch: master | Salah-Eddin Shaban <salah at videolan.org> | Fri May 21 18:15:07 2021 +0300| [66e287ea014eef76dcbd224a84322ab136c1e291] | committer: Jean-Baptiste Kempf

Freetype: use FT_Glyph_Stroke to create outlines

FT_Glyph_Stroke is more tolerant of font files that do not follow
contour orientation conventions, like Helvetica Neue.
It also creates unfilled outline glyphs that can be more efficiently
blended.

Fixes #21043

(cherry picked from commit 074b4f3c4adf21b574c4a5127bac18cf7e94d821)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=66e287ea014eef76dcbd224a84322ab136c1e291
---

 modules/text_renderer/freetype/text_layout.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/text_renderer/freetype/text_layout.c b/modules/text_renderer/freetype/text_layout.c
index 4dce1e30ba..672a470b35 100644
--- a/modules/text_renderer/freetype/text_layout.c
+++ b/modules/text_renderer/freetype/text_layout.c
@@ -1060,8 +1060,8 @@ static int LoadGlyphs( filter_t *p_filter, paragraph_t *p_paragraph,
             if( p_filter->p_sys->p_stroker && (p_style->i_style_flags & STYLE_OUTLINE) )
             {
                 p_bitmaps->p_outline = p_bitmaps->p_glyph;
-                if( FT_Glyph_StrokeBorder( &p_bitmaps->p_outline,
-                                           p_filter->p_sys->p_stroker, 0, 0 ) )
+                if( FT_Glyph_Stroke( &p_bitmaps->p_outline,
+                                      p_filter->p_sys->p_stroker, 0 ) )
                     p_bitmaps->p_outline = 0;
             }
 



More information about the vlc-commits mailing list