Module: wine Branch: master Commit: 5734c2ed9825c61d5a5299a17e7fd922ee86132a URL: http://source.winehq.org/git/wine.git/?a=commit;h=5734c2ed9825c61d5a5299a17e...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Thu Aug 6 19:43:41 2015 +0300
dwrite: Implement GetPaletteEntryCount().
---
dlls/dwrite/dwrite_private.h | 1 + dlls/dwrite/font.c | 4 ++-- dlls/dwrite/opentype.c | 6 ++++++ 3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 7668bc9..a849406 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -154,6 +154,7 @@ extern HRESULT opentype_get_font_strings_from_id(const void*,DWRITE_INFORMATIONA extern HRESULT opentype_get_typographic_features(IDWriteFontFace*,UINT32,UINT32,UINT32,UINT32*,DWRITE_FONT_FEATURE_TAG*) DECLSPEC_HIDDEN; extern BOOL opentype_get_vdmx_size(const void*,INT,UINT16*,UINT16*) DECLSPEC_HIDDEN; extern UINT32 opentype_get_cpal_palettecount(const void*) DECLSPEC_HIDDEN; +extern UINT32 opentype_get_cpal_paletteentrycount(const void*) DECLSPEC_HIDDEN;
enum gasp_flags { GASP_GRIDFIT = 0x0001, diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 1ee97fa..266f7ef 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -964,8 +964,8 @@ static UINT32 WINAPI dwritefontface2_GetColorPaletteCount(IDWriteFontFace2 *ifac static UINT32 WINAPI dwritefontface2_GetPaletteEntryCount(IDWriteFontFace2 *iface) { struct dwrite_fontface *This = impl_from_IDWriteFontFace2(iface); - FIXME("(%p): stub\n", This); - return 0; + TRACE("(%p)\n", This); + return opentype_get_cpal_paletteentrycount(get_fontface_cpal(This)); }
static HRESULT WINAPI dwritefontface2_GetPaletteEntries(IDWriteFontFace2 *iface, UINT32 palette_index, diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index 389183f..7be9df3 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -1428,3 +1428,9 @@ UINT32 opentype_get_cpal_palettecount(const void *cpal) const struct CPAL_Header_0 *header = (const struct CPAL_Header_0*)cpal; return header ? GET_BE_WORD(header->numPalette) : 0; } + +UINT32 opentype_get_cpal_paletteentrycount(const void *cpal) +{ + const struct CPAL_Header_0 *header = (const struct CPAL_Header_0*)cpal; + return header ? GET_BE_WORD(header->numPaletteEntries) : 0; +}