2 commits - src/win32
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Oct 26 14:29:22 UTC 2024
src/win32/cairo-dwrite-font.cpp | 4 ++--
src/win32/dw-extra.h | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 33173d9f1a79a58d518ffbe0e597bd4ca9bf1464
Merge: 17ea368a1 0835add95
Author: Tim-Philipp Müller <tim at centricular.com>
Date: Sat Oct 26 14:29:19 2024 +0000
Merge branch 'mingw11' into 'master'
dwrite: Fix build with MinGW 11
Closes #874
See merge request cairo/cairo!600
commit 0835add95c1391164e52c551569a9c46a6fcd90c
Author: Nirbheek Chauhan <nirbheek at centricular.com>
Date: Fri Oct 18 02:36:48 2024 +0530
dwrite: Fix build with MinGW 11
DWRITE_GLYPH_IMAGE_FORMATS is now defined by dcommon.h
In file included from C:/msys64/ucrt64/include/minwindef.h:163,
from C:/msys64/ucrt64/include/windef.h:9,
from C:/msys64/ucrt64/include/windows.h:69,
from ..\src/cairo-mutex-impl-private.h:182,
from ..\src/cairo-mutex-type-private.h:45,
from ..\src/cairo-scaled-font-private.h:45,
from ..\src/cairoint.h:415,
from ../src/win32/cairo-dwrite-font.cpp:37:
../src/win32/dw-extra.h:26:1: error: redefinition of 'DWRITE_GLYPH_IMAGE_FORMATS operator|(DWRITE_GLYPH_IMAGE_FORMATS, DWRITE_GLYPH_IMAGE_FORMATS)'
26 | DEFINE_ENUM_FLAG_OPERATORS(DWRITE_GLYPH_IMAGE_FORMATS);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:/msys64/ucrt64/include/dcommon.h:67:1: note: 'DWRITE_GLYPH_IMAGE_FORMATS operator|(DWRITE_GLYPH_IMAGE_FORMATS, DWRITE_GLYPH_IMAGE_FORMATS)' previously defined here
67 | DEFINE_ENUM_FLAG_OPERATORS(DWRITE_GLYPH_IMAGE_FORMATS)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/src/win32/cairo-dwrite-font.cpp b/src/win32/cairo-dwrite-font.cpp
index b6931b367..f7d1c4767 100644
--- a/src/win32/cairo-dwrite-font.cpp
+++ b/src/win32/cairo-dwrite-font.cpp
@@ -1047,13 +1047,13 @@ _cairo_dwrite_scaled_font_init_glyph_color_surface(cairo_dwrite_scaled_font_t *s
matrix = _cairo_dwrite_matrix_from_matrix(&scaled_font->mat);
/* The list of glyph image formats this renderer is prepared to support. */
- DWRITE_GLYPH_IMAGE_FORMATS supported_formats =
+ DWRITE_GLYPH_IMAGE_FORMATS supported_formats = static_cast<DWRITE_GLYPH_IMAGE_FORMATS>(
DWRITE_GLYPH_IMAGE_FORMATS_COLR |
DWRITE_GLYPH_IMAGE_FORMATS_SVG |
DWRITE_GLYPH_IMAGE_FORMATS_PNG |
DWRITE_GLYPH_IMAGE_FORMATS_JPEG |
DWRITE_GLYPH_IMAGE_FORMATS_TIFF |
- DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8;
+ DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8);
RefPtr<IDWriteFontFace2> fontFace2;
UINT32 palette_count = 0;
diff --git a/src/win32/dw-extra.h b/src/win32/dw-extra.h
index 424fb606d..a9daced21 100644
--- a/src/win32/dw-extra.h
+++ b/src/win32/dw-extra.h
@@ -23,6 +23,8 @@ struct DWRITE_COLOR_GLYPH_RUN1_WORKAROUND : DWRITE_COLOR_GLYPH_RUN
typedef DWRITE_COLOR_GLYPH_RUN1 DWRITE_COLOR_GLYPH_RUN1_WORKAROUND;
#endif
+#if !defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 11
DEFINE_ENUM_FLAG_OPERATORS(DWRITE_GLYPH_IMAGE_FORMATS);
+#endif
#endif /* DWRITE_EXTRA_H */
More information about the cairo-commit
mailing list