summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2019-03-11 03:51:40 +0100
committerFlorian Müllner <fmuellner@gnome.org>2019-05-30 17:38:59 +0000
commitbab53d91a8543e2ddb15f9dce98ebb3f9bcd5d22 (patch)
tree0902d3c9f7d4312524e54b73ecf8462a7d4abda3
parentdfe3aa6d88ad548b729cf8e5b5ff9d80fbb0e412 (diff)
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.
-rw-r--r--src/cairo-ft-font.c6
1 files 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) {