From 7c12db46ff3fd771db4cc2d2cc6fea8937b34532 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 18 Dec 2022 23:36:05 -0500 Subject: [PATCH] Try to fix msvc build --- src/hb-ot-color-colr-table.hh | 2 +- util/hb-cairo-utils.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-color-colr-table.hh b/src/hb-ot-color-colr-table.hh index cf13dfbbe..9b1f7f7c0 100644 --- a/src/hb-ot-color-colr-table.hh +++ b/src/hb-ot-color-colr-table.hh @@ -28,11 +28,11 @@ #ifndef HB_OT_COLOR_COLR_TABLE_HH #define HB_OT_COLOR_COLR_TABLE_HH +#include "hb.hh" #include "hb-open-type.hh" #include "hb-ot-layout-common.hh" #include "hb-ot-var-common.hh" #include "hb-paint.hh" -#include /* * COLR -- Color diff --git a/util/hb-cairo-utils.c b/util/hb-cairo-utils.c index bf8d4c085..285811afb 100644 --- a/util/hb-cairo-utils.c +++ b/util/hb-cairo-utils.c @@ -24,6 +24,8 @@ * Google Author(s): Matthias Clasen */ +#include "config.h" + #include "hb-cairo-utils.h" #include @@ -31,6 +33,7 @@ #include #include #include +#define _USE_MATH_DEFINES #include #include @@ -133,6 +136,7 @@ hb_cairo_paint_glyph_image (cairo_t *cr, hb_tag_t format, hb_glyph_extents_t *extents) { +#ifdef CAIRO_HAS_PNG_FUNCTIONS if (format != HB_PAINT_IMAGE_FORMAT_PNG || !extents) return; @@ -157,6 +161,7 @@ hb_cairo_paint_glyph_image (cairo_t *cr, cairo_pattern_destroy (pattern); cairo_surface_destroy (surface); +#endif } static void