Commit 0d38084b authored by Rafaël Carré's avatar Rafaël Carré

freetype: use [.\/_] to break lines when ' ' only failed

parent b37f567e
......@@ -1264,11 +1264,22 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
if( p_prev ) p_prev->p_next = p_line;
else p_lines = p_line;
uint32_t *psz_unicode_saved = psz_unicode;
while( psz_unicode > psz_line_start && *psz_unicode != ' ' )
{
psz_unicode--;
}
if( psz_unicode == psz_line_start )
{ /* try harder to break that line */
psz_unicode = psz_unicode_saved;
while( psz_unicode > psz_line_start &&
*psz_unicode != '_' && *psz_unicode != '/' &&
*psz_unicode != '\\' && *psz_unicode != '.' )
{
psz_unicode--;
}
}
if( psz_unicode == psz_line_start )
{
msg_Warn( p_filter, "unbreakable string" );
goto error;
......
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