* src/ttgxvar.c: Minor changes.

(TT_Get_MM_Var): Improve tracing messages.
(tt_set_mm_blend): Minor speed-up.
This commit is contained in:
Werner Lemberg 2023-04-26 19:00:05 +02:00
parent cfe54d6ac3
commit 9a3d05d980
2 changed files with 22 additions and 19 deletions

View File

@ -1612,7 +1612,7 @@
FT_Service_MultiMasters mm = (FT_Service_MultiMasters)face->mm;
if (mm)
if ( mm )
mm->done_blend( FT_FACE( face ) );
}

View File

@ -2544,7 +2544,7 @@
goto Exit;
}
FT_TRACE5(( "%d instance%s\n",
FT_TRACE5(( "%d named instance%s\n",
fvar_head.instanceCount,
fvar_head.instanceCount == 1 ? "" : "s" ));
@ -2602,7 +2602,7 @@
(void)FT_STREAM_SEEK( pos );
FT_TRACE5(( " instance %d (%s%s%s, %s%s%s)\n",
FT_TRACE5(( " named instance %d (%s%s%s, %s%s%s)\n",
i,
strname ? "name: `" : "",
strname ? strname : "unnamed",
@ -2845,26 +2845,29 @@
}
}
if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) )
if ( !have_diff )
{
FT_UInt instance_index = (FT_UInt)face->root.face_index >> 16;
if ( FT_IS_NAMED_INSTANCE( FT_FACE( face ) ) )
{
FT_UInt instance_index = (FT_UInt)face->root.face_index >> 16;
c = blend->normalizedcoords + i;
n = blend->normalized_stylecoords +
( instance_index - 1 ) * mmvar->num_axis +
i;
c = blend->normalizedcoords + i;
n = blend->normalized_stylecoords +
( instance_index - 1 ) * mmvar->num_axis +
i;
for ( j = i; j < mmvar->num_axis; j++, n++, c++ )
if ( *c != *n )
have_diff = 1;
}
else
{
c = blend->normalizedcoords + i;
for ( j = i; j < mmvar->num_axis; j++, c++ )
if ( *c != 0 )
have_diff = 1;
for ( j = i; j < mmvar->num_axis; j++, n++, c++ )
if ( *c != *n )
have_diff = 1;
}
else
{
c = blend->normalizedcoords + i;
for ( j = i; j < mmvar->num_axis; j++, c++ )
if ( *c != 0 )
have_diff = 1;
}
}
/* return value -1 indicates `no change' */