FT_Bitmap aBitmap = myFTFace->glyph->bitmap;
if (aBitmap.pixel_mode != FT_PIXEL_MODE_GRAY
- || aBitmap.buffer == NULL || aBitmap.width <= 0 || aBitmap.rows <= 0)
+ || aBitmap.buffer == NULL || aBitmap.width == 0 || aBitmap.rows == 0)
{
return false;
}
//! Retrieve glyph bitmap rectangle
inline void GlyphRect (Font_FTFont::Rect& theRect) const
{
- FT_Bitmap aBitmap = myFTFace->glyph->bitmap;
+ const FT_Bitmap& aBitmap = myFTFace->glyph->bitmap;
theRect.Left = float(myFTFace->glyph->bitmap_left);
theRect.Top = float(myFTFace->glyph->bitmap_top);
- theRect.Right = float(myFTFace->glyph->bitmap_left + aBitmap.width);
- theRect.Bottom = float(myFTFace->glyph->bitmap_top - aBitmap.rows);
+ theRect.Right = float(myFTFace->glyph->bitmap_left + (int )aBitmap.width);
+ theRect.Bottom = float(myFTFace->glyph->bitmap_top - (int )aBitmap.rows);
}
protected: