From 00ce12846a09594b90c0b9c71915d26bd5e5ecc2 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Mon, 10 Jun 2024 11:07:46 +0930 Subject: [PATCH 1/2] Fix cairo-ft-font.c build failure when fontconfig not available --- src/cairo-ft-font.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index 2c446a5d6..d325cc8a6 100644 --- a/src/cairo-ft-font.c +++ b/src/cairo-ft-font.c @@ -1417,7 +1417,7 @@ _render_glyph_outline (FT_Face face, cairo_font_options_t *font_options, cairo_image_surface_t **surface) { - int rgba = FC_RGBA_UNKNOWN; + cairo_subpixel_order_t rgba = CAIRO_SUBPIXEL_ORDER_DEFAULT; int lcd_filter = FT_LCD_FILTER_DEFAULT; FT_GlyphSlot glyphslot = face->glyph; FT_Outline *outline = &glyphslot->outline; @@ -1518,16 +1518,16 @@ _render_glyph_outline (FT_Face face, switch (render_mode) { case FT_RENDER_MODE_LCD: if (font_options->subpixel_order == CAIRO_SUBPIXEL_ORDER_BGR) - rgba = FC_RGBA_BGR; + rgba = CAIRO_SUBPIXEL_ORDER_BGR; else - rgba = FC_RGBA_RGB; + rgba = CAIRO_SUBPIXEL_ORDER_RGB; break; case FT_RENDER_MODE_LCD_V: if (font_options->subpixel_order == CAIRO_SUBPIXEL_ORDER_VBGR) - rgba = FC_RGBA_VBGR; + rgba = CAIRO_SUBPIXEL_ORDER_VBGR; else - rgba = FC_RGBA_VRGB; + rgba = CAIRO_SUBPIXEL_ORDER_VRGB; break; case FT_RENDER_MODE_MONO: @@ -1559,7 +1559,7 @@ _render_glyph_outline (FT_Face face, return _cairo_error (CAIRO_STATUS_NO_MEMORY); _fill_xrender_bitmap (&bitmap, face->glyph, render_mode, - (rgba == FC_RGBA_BGR || rgba == FC_RGBA_VBGR)); + (rgba == CAIRO_SUBPIXEL_ORDER_BGR || rgba == CAIRO_SUBPIXEL_ORDER_VBGR)); /* Note: * _get_bitmap_surface will free bitmap.buffer if there is an error From f1b781e99df89d8b9650eb56c54448257277b117 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Mon, 10 Jun 2024 13:18:56 +0930 Subject: [PATCH 2/2] Build mingw-32 in CI with fontconfig disabled This gives us one build in CI that has FreeType enabled and Fontconfig disabled in order to ensure this combination builds. Building the Fontconfig backend with Mingw is still checked in the mingw-64 build. --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0ff91612d..0202fad0a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -271,7 +271,8 @@ mingw-32 build: script: - mkdir builddir - cd builddir - - mingw32-meson --default-library=both + # Test building with FreeType enabled and Fontconfig disabled + - mingw32-meson --default-library=both -Dfontconfig=disabled - ninja install artifacts: expire_in: "7 days"