[vlc-commits] freetype: don't set default face without charset/fallback
Francois Cartegnie
git at videolan.org
Tue Jul 7 20:34:07 CEST 2020
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Jun 26 15:41:48 2020 +0200| [a7d5966d08c6d413b4e844fd51c90f9126d0abdb] | committer: Francois Cartegnie
freetype: don't set default face without charset/fallback
Otherwise codepoint == 0 always sets default font
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a7d5966d08c6d413b4e844fd51c90f9126d0abdb
---
modules/text_renderer/freetype/text_layout.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules/text_renderer/freetype/text_layout.c b/modules/text_renderer/freetype/text_layout.c
index 7a496bde7e..a50abdb4da 100644
--- a/modules/text_renderer/freetype/text_layout.c
+++ b/modules/text_renderer/freetype/text_layout.c
@@ -578,8 +578,6 @@ static int AddRunWithFallback( filter_t *p_filter, paragraph_t *p_paragraph,
FT_Face pp_faces[ MAX_FACES ] = {0};
FT_Face p_face = NULL;
- pp_faces[ 0 ] = SelectAndLoadFace( p_filter, p_style, 0 );
-
for( int i = i_start_offset; i < i_end_offset; ++i )
{
int i_index = 0;
@@ -627,7 +625,8 @@ static int AddRunWithFallback( filter_t *p_filter, paragraph_t *p_paragraph,
if( i == i_end_offset
|| p_paragraph->pp_faces[ i_run_start ] != p_paragraph->pp_faces[ i ] )
{
- if( AddRun( p_filter, p_paragraph, i_run_start, i,
+ if( p_paragraph->pp_faces[ i_run_start ] &&
+ AddRun( p_filter, p_paragraph, i_run_start, i,
p_paragraph->pp_faces[ i_run_start ], NULL ) )
return VLC_EGENERIC;
More information about the vlc-commits
mailing list