Werner Lemberg pushed to branch master at FreeType / FreeType
Commits:
-
1452355d
by Werner Lemberg at 2024-07-19T22:35:37+02:00
1 changed file:
Changes:
... | ... | @@ -994,16 +994,16 @@ |
994 | 994 | FT_Error error;
|
995 | 995 | FT_UInt i;
|
996 | 996 | |
997 | - /* unscaled CVT values are already stored in 26.6 format */
|
|
998 | - FT_Fixed scale = size->ttmetrics.scale >> 6;
|
|
999 | - |
|
1000 | 997 | |
1001 | 998 | /* Scale the cvt values to the new ppem. */
|
1002 | 999 | /* By default, we use the y ppem value for scaling. */
|
1003 | 1000 | FT_TRACE6(( "CVT values:\n" ));
|
1004 | 1001 | for ( i = 0; i < size->cvt_size; i++ )
|
1005 | 1002 | {
|
1006 | - size->cvt[i] = FT_MulFix( face->cvt[i], scale );
|
|
1003 | + /* Unscaled CVT values are already stored in 26.6 format. */
|
|
1004 | + /* Note that this scaling operation is very sensitive to rounding; */
|
|
1005 | + /* the integer division by 64 must be applied to the first argument. */
|
|
1006 | + size->cvt[i] = FT_MulFix( face->cvt[i] / 64, size->ttmetrics.scale );
|
|
1007 | 1007 | FT_TRACE6(( " %3d: %f (%f)\n",
|
1008 | 1008 | i, (double)face->cvt[i] / 64, (double)size->cvt[i] / 64 ));
|
1009 | 1009 | }
|