[sfnt] Fix handling of PS names for Variation Fonts.

* src/sfnt/sfdriver.c (get_win_string, get_apple_string): Continue
construction of string if an invalid character is encountered.

Fixes #1218.
This commit is contained in:
Werner Lemberg 2023-04-25 09:30:30 +02:00
parent f312b3402a
commit 40676afc4c

View File

@ -523,15 +523,14 @@
FT_TRACE0(( "get_win_string:"
" Character 0x%X invalid in PS name string\n",
((unsigned)p[0])*256 + (unsigned)p[1] ));
break;
continue;
}
}
if ( !len )
*r = '\0';
*r = '\0';
FT_FRAME_EXIT();
if ( !len )
if ( r != result )
return result;
get_win_string_error:
@ -580,15 +579,14 @@
FT_TRACE0(( "get_apple_string:"
" Character `%c' (0x%X) invalid in PS name string\n",
*p, *p ));
break;
continue;
}
}
if ( !len )
*r = '\0';
*r = '\0';
FT_FRAME_EXIT();
if ( !len )
if ( r != result )
return result;
get_apple_string_error: