aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/type1/t1afm.c
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/src/type1/t1afm.c')
-rw-r--r--freetype/src/type1/t1afm.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/freetype/src/type1/t1afm.c b/freetype/src/type1/t1afm.c
index 25a69f09a..89a2bfb61 100644
--- a/freetype/src/type1/t1afm.c
+++ b/freetype/src/type1/t1afm.c
@@ -4,7 +4,7 @@
/* */
/* AFM support for Type 1 fonts (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -58,7 +58,7 @@
/* PS string/name length must be < 16-bit */
- if ( ( len - 0xFFFFU ) > 0 )
+ if ( len > 0xFFFFU )
return 0;
for ( n = 0; n < type1->num_glyphs; n++ )
@@ -285,13 +285,15 @@
{
t1_font->font_bbox = fi->FontBBox;
- t1_face->bbox.xMin = fi->FontBBox.xMin >> 16;
- t1_face->bbox.yMin = fi->FontBBox.yMin >> 16;
- t1_face->bbox.xMax = ( fi->FontBBox.xMax + 0xFFFFU ) >> 16;
- t1_face->bbox.yMax = ( fi->FontBBox.yMax + 0xFFFFU ) >> 16;
+ t1_face->bbox.xMin = fi->FontBBox.xMin >> 16;
+ t1_face->bbox.yMin = fi->FontBBox.yMin >> 16;
+ /* no `U' suffix here to 0xFFFF! */
+ t1_face->bbox.xMax = ( fi->FontBBox.xMax + 0xFFFF ) >> 16;
+ t1_face->bbox.yMax = ( fi->FontBBox.yMax + 0xFFFF ) >> 16;
- t1_face->ascender = (FT_Short)( ( fi->Ascender + 0x8000U ) >> 16 );
- t1_face->descender = (FT_Short)( ( fi->Descender + 0x8000U ) >> 16 );
+ /* no `U' suffix here to 0x8000! */
+ t1_face->ascender = (FT_Short)( ( fi->Ascender + 0x8000 ) >> 16 );
+ t1_face->descender = (FT_Short)( ( fi->Descender + 0x8000 ) >> 16 );
if ( fi->NumKernPair )
{