summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/base/ftobjs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 2c0f0e6c9..10952a6c6 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -2527,6 +2527,15 @@
#endif
+ /* only use lower 31 bits together with sign bit */
+ if ( face_index > 0 )
+ face_index &= 0x7FFFFFFFL;
+ else
+ {
+ face_index &= 0x7FFFFFFFL;
+ face_index = -face_index;
+ }
+
#ifdef FT_DEBUG_LEVEL_TRACE
FT_TRACE3(( "FT_Open_Face: " ));
if ( face_index < 0 )