Remove apparent SkIntToScalar(SkScalar) call in SkScalerContext_FreeType
authorepoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 18 Jan 2012 19:20:39 +0000 (19:20 +0000)
committerepoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 18 Jan 2012 19:20:39 +0000 (19:20 +0000)
This change seems to fix the following assertion failure we have been seeing
in the Skia_Linux_Fixed_Debug build since http://code.google.com/p/skia/source/detail?r=3059 :

drawing... bitmapfilters [540 330]
../include/core/SkFixed.h:67: failed assertion "n >= -32768 && n <= 32767"
Review URL: https://codereview.appspot.com/5557049

git-svn-id: http://skia.googlecode.com/svn/trunk@3066 2bbb7eff-a529-9590-31e7-b0007b416f81

src/ports/SkFontHost_FreeType.cpp

index 61efb95..a58cd37 100644 (file)
@@ -1422,7 +1422,7 @@ void SkScalerContext_FreeType::generateFontMetrics(SkPaint::FontMetrics* mx,
                 emboldenOutline(&fFace->glyph->outline);
             }
             FT_Outline_Get_CBox(&fFace->glyph->outline, &bbox);
-            x_height = SkIntToScalar(bbox.yMax) / 64;
+            x_height = SkFixedToScalar(SkFDot6ToFixed(bbox.yMax));
         } else {
             x_height = 0;
         }