Browse Source

text_renderer/freetype: fix SIGSEGV in harfbuzz

There is no documentation but that is how they do it in their tests:
https://github.com/harfbuzz/harfbuzz/blob/master/test/api/test-unicode.c#L587

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
pull/72/head
Filip Roséen 8 years ago
committed by Thomas Guillem
parent
commit
8c2351eeec
  1. 3
      modules/text_renderer/freetype/text_layout.c

3
modules/text_renderer/freetype/text_layout.c

@ -466,7 +466,8 @@ static int AnalyzeParagraph( paragraph_t *p_paragraph )
#endif
#ifdef HAVE_HARFBUZZ
hb_unicode_funcs_t *p_funcs = hb_unicode_funcs_get_default();
hb_unicode_funcs_t *p_funcs =
hb_unicode_funcs_create( hb_unicode_funcs_get_default() );
for( int i = 0; i < p_paragraph->i_size; ++i )
p_paragraph->p_scripts[ i ] =
hb_unicode_script( p_funcs, p_paragraph->p_code_points[ i ] );

Loading…
Cancel
Save