From bab53d91a8543e2ddb15f9dce98ebb3f9bcd5d22 Mon Sep 17 00:00:00 2001 From: Florian Müllner Date: Mon, 11 Mar 2019 03:51:40 +0100 Subject: ft-font: Fix color font support FT_PIXEL_MODE_BGRA is an enum member, not a define, so it always appears as 0 in the preprocessor conditions added in commit c0ed8ce1a11. There is an existing define for color font support, use that instead. --- src/cairo-ft-font.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index fea489d01..6b2af3713 100644 --- a/src/cairo-ft-font.c +++ b/src/cairo-ft-font.c @@ -976,7 +976,7 @@ _compute_xrender_bitmap_size(FT_Bitmap *target, pitch = width * 4; break; -#ifdef FT_PIXEL_MODE_BGRA +#ifdef FT_LOAD_COLOR case FT_PIXEL_MODE_BGRA: /* each pixel is replicated into a 32-bit ARGB value */ pitch = width * 4; @@ -1179,7 +1179,7 @@ _fill_xrender_bitmap(FT_Bitmap *target, } break; -#ifdef FT_PIXEL_MODE_BGRA +#ifdef FT_LOAD_COLOR case FT_PIXEL_MODE_BGRA: for (h = height; h > 0; h--, srcLine += src_pitch, dstLine += pitch) memcpy (dstLine, srcLine, width * 4); @@ -1293,7 +1293,7 @@ _get_bitmap_surface (FT_Bitmap *bitmap, component_alpha = TRUE; } break; -#ifdef FT_PIXEL_MODE_BGRA +#ifdef FT_LOAD_COLOR case FT_PIXEL_MODE_BGRA: stride = width * 4; if (own_buffer) { -- cgit v1.2.3