|
|
|
@ -448,13 +448,21 @@ |
|
|
|
|
/* 16.16 fixed point is used internally for CFF2 blend results. */ |
|
|
|
|
/* Since these are trusted values, a limit check is not needed. */ |
|
|
|
|
|
|
|
|
|
/* After the 255, 4 bytes give the number. */ |
|
|
|
|
/* Blend result is rounded to integer. */ |
|
|
|
|
/* After the 255, 4 bytes give the number. */ |
|
|
|
|
/* The blend value is converted to integer, with rounding; */ |
|
|
|
|
/* due to the right-shift we don't need the lowest byte. */ |
|
|
|
|
#if 0 |
|
|
|
|
return (FT_Short)( |
|
|
|
|
( ( ( (FT_UInt32)*( d[0] + 1 ) << 24 ) | |
|
|
|
|
( (FT_UInt32)*( d[0] + 2 ) << 16 ) | |
|
|
|
|
( (FT_UInt32)*( d[0] + 3 ) << 8 ) | |
|
|
|
|
(FT_UInt32)*( d[0] + 4 ) ) + 0x8000U ) >> 16 ); |
|
|
|
|
#else |
|
|
|
|
return (FT_Short)( |
|
|
|
|
( ( ( (FT_ULong)*( d[0] + 1 ) << 24 ) | |
|
|
|
|
( (FT_ULong)*( d[0] + 2 ) << 16 ) | |
|
|
|
|
( (FT_ULong)*( d[0] + 3 ) << 8 ) | |
|
|
|
|
(FT_ULong)*( d[0] + 4 ) ) + 0x8000U ) >> 16 ); |
|
|
|
|
( ( ( (FT_UInt32)*( d[0] + 1 ) << 16 ) | |
|
|
|
|
( (FT_UInt32)*( d[0] + 2 ) << 8 ) | |
|
|
|
|
(FT_UInt32)*( d[0] + 3 ) ) + 0x80U ) >> 8 ); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
else |
|
|
|
|