Commit 50b2a3bb authored by 김정은's avatar 김정은 Committed by Jean-Baptiste Kempf

freetype: Try to use non-bitmap fonts first and fallback to bitmap ones

Signed-off-by: default avatarIlkka Ollakka <ileoo@videolan.org>
(commited with --author, no git-format patch was send to vlc-devel even if requested)
(cherry picked from commit 6650cb888870a57b45165635a486d36d9afbcf87)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 16cc1a60
......@@ -1242,6 +1242,9 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
}
p_line->p_glyph_pos[ i ].x = i_pen_x;
p_line->p_glyph_pos[ i ].y = i_pen_y;
i_error = FT_Load_Glyph( face, i_glyph_index, FT_LOAD_NO_BITMAP | FT_LOAD_DEFAULT );
if( i_error )
{
i_error = FT_Load_Glyph( face, i_glyph_index, FT_LOAD_DEFAULT );
if( i_error )
{
......@@ -1249,6 +1252,7 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
" %d", i_error );
goto error;
}
}
i_error = FT_Get_Glyph( glyph, &tmp_glyph );
if( i_error )
{
......@@ -1528,6 +1532,9 @@ static int RenderTag( filter_t *p_filter, FT_Face p_face, int i_font_color,
p_line->p_glyph_pos[ i ].x = *pi_pen_x;
p_line->p_glyph_pos[ i ].y = i_pen_y;
i_error = FT_Load_Glyph( p_face, i_glyph_index, FT_LOAD_NO_BITMAP | FT_LOAD_DEFAULT );
if( i_error )
{
i_error = FT_Load_Glyph( p_face, i_glyph_index, FT_LOAD_DEFAULT );
if( i_error )
{
......@@ -1536,6 +1543,7 @@ static int RenderTag( filter_t *p_filter, FT_Face p_face, int i_font_color,
p_line->pp_glyphs[ i ] = NULL;
return VLC_EGENERIC;
}
}
/* Do synthetic styling now that Freetype supports it;
* ie. if the font we have loaded is NOT already in the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment