mirror of
https://gitlab.freedesktop.org/freetype/freetype.git
synced 2025-12-29 00:20:08 +01:00
Fix setting of named-instance to Regular
Fixes https://gitlab.freedesktop.org/freetype/freetype/-/issues/1341 And more elaborate avoidance of loading face->blend if all coords are zero.
This commit is contained in:
parent
320b72a295
commit
cf06661c51
1 changed files with 14 additions and 7 deletions
|
|
@ -2942,11 +2942,15 @@
|
|||
|
||||
if ( !face->blend )
|
||||
{
|
||||
if ( !num_coords )
|
||||
{
|
||||
face->doblend = FALSE;
|
||||
face->doblend = FALSE;
|
||||
for ( i = 0; i < num_coords; i++ )
|
||||
if ( coords[i] )
|
||||
{
|
||||
face->doblend = TRUE;
|
||||
break;
|
||||
}
|
||||
if ( !face->doblend )
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
if ( FT_SET_ERROR( TT_Get_MM_Var( FT_FACE( face ), NULL ) ) )
|
||||
goto Exit;
|
||||
|
|
@ -4294,15 +4298,18 @@
|
|||
FT_Fixed* point_deltas_y = NULL;
|
||||
|
||||
|
||||
if ( !face->doblend || !blend )
|
||||
return FT_THROW( Invalid_Argument );
|
||||
|
||||
for ( i = 0; i < n_points; i++ )
|
||||
{
|
||||
unrounded[i].x = INT_TO_F26DOT6( outline->points[i].x );
|
||||
unrounded[i].y = INT_TO_F26DOT6( outline->points[i].y );
|
||||
}
|
||||
|
||||
if ( !face->doblend )
|
||||
goto Exit;
|
||||
|
||||
if ( !blend )
|
||||
return FT_THROW( Invalid_Argument );
|
||||
|
||||
if ( glyph_index >= blend->gv_glyphcnt ||
|
||||
blend->glyphoffsets[glyph_index] ==
|
||||
blend->glyphoffsets[glyph_index + 1] )
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue