When using IDWriteColorGlyphRunEnumerator1::GetCurrentRun() to get a pointer to a DWRITE_COLOR_GLYPH_RUN1 struct, the glyphImageFormat field of the struct contains garbage values. The problems seems to be that MinGW does not use inheritance to define the struct as it is described in MSDN. Instead it includes all the DWRITE_COLOR_GLYPH_RUN members in the DWRITE_COLOR_GLYPH_RUN1 struct. If I insert 6 bytes of padding before the glyphImageFormat I get the correct values in glyphImageFormat.
I also noticed, while trying to get this code to work, that DWRITE_GLYPH_IMAGE_FORMATS does not have DEFINE_ENUM_FLAG_OPERATORS, and IDWriteFontFace4::GetGlyphImageFormats(UINT16,UINT32,UINT32,DWRITE_GLYPH_IMAGE_FORMATS) has an underscore appended to the function name.
The DWRITE_COLOR_GLYPH_RUN1 problem was fixed.
https://github.com/wine-mirror/wine/commit/d967200938435db18185f7d0bfcbfb19a74de714