check if FT_PIXEL_MODE_BGRA is defined (freetype < 2.5.0) (#3797)

This commit is contained in:
Artem Pavlenko 2017-11-28 11:23:13 +01:00
parent 498142f700
commit 6eafffaf57

View file

@ -178,7 +178,9 @@ void agg_text_renderer<T>::render(glyph_positions const& pos)
if (!error)
{
FT_BitmapGlyph bit = reinterpret_cast<FT_BitmapGlyph>(g);
#ifdef FT_PIXEL_MODE_BGRA
if (bit->bitmap.pixel_mode != FT_PIXEL_MODE_BGRA)
#endif
{
composite_bitmap(pixmap_,
&bit->bitmap,