I want to move CURRENT_Ppem outside of the point loops. It seems to
work fine. Anything wrong with that?
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 9491533..082114a 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -7490,7 +7490,7 @@
FT_ULong k, nump;
FT_UShort A;
FT_ULong C;
- FT_Long B;
+ FT_Long B, P;
#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
FT_UShort B1, B2;
@@ -7525,6 +7525,7 @@
nump = (FT_ULong)args[0]; /* some points theoretically may occur more
than once, thus UShort isn't enough */
+ P = CURRENT_Ppem();
for ( k = 1; k <= nump; k++ )
{
@@ -7567,7 +7568,7 @@
C += CUR.GS.delta_base;
- if ( CURRENT_Ppem() == (FT_Long)C )
+ if ( P == (FT_Long)C )
{
B = ( (FT_ULong)B & 0xF ) - 8;
if ( B >= 0 )
@@ -7668,7 +7669,7 @@
{
FT_ULong nump, k;
FT_ULong A, C;
- FT_Long B;
+ FT_Long B, P;
#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
@@ -7692,6 +7693,7 @@
#endif
nump = (FT_ULong)args[0];
+ P = CURRENT_Ppem();
for ( k = 1; k <= nump; k++ )
{
@@ -7736,7 +7738,7 @@
C += CUR.GS.delta_base;
- if ( CURRENT_Ppem() == (FT_Long)C )
+ if ( P == (FT_Long)C )
{
B = ( (FT_ULong)B & 0xF ) - 8;
if ( B >= 0 )
_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel