[truetype] Minor.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
diff --git a/ChangeLog b/ChangeLog
index 122082e..2929e7c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-05-20 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Minor.
+
+ * src/truetype/ttinterp.h (SetSuperRound): Fix type of `GridPeriod'
+ argument.
+
2015-05-17 Werner Lemberg <wl@gnu.org>
[truetype] Fix loading of composite glyphs.
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index b9ae045..0e536af 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -1930,7 +1930,7 @@
val = 0;
}
- return val;
+ return val;
}
@@ -2273,7 +2273,7 @@
/* */
static void
SetSuperRound( TT_ExecContext exc,
- FT_F26Dot6 GridPeriod,
+ FT_F2Dot14 GridPeriod,
FT_Long selector )
{
switch ( (FT_Int)( selector & 0xC0 ) )
@@ -2291,7 +2291,6 @@
break;
/* This opcode is reserved, but... */
-
case 0xC0:
exc->period = GridPeriod;
break;
@@ -2321,9 +2320,10 @@
else
exc->threshold = ( (FT_Int)( selector & 0x0F ) - 4 ) * exc->period / 8;
- exc->period /= 256;
- exc->phase /= 256;
- exc->threshold /= 256;
+ /* convert to F26Dot6 format */
+ exc->period >>= 8;
+ exc->phase >>= 8;
+ exc->threshold >>= 8;
}