gdi32: Implement GetFontUnicodeRanges as a standard driver entry point.

This commit is contained in:
Alexandre Julliard 2011-10-20 16:26:26 +02:00
parent 23c7c0469c
commit 90ecea9739
3 changed files with 18 additions and 13 deletions

View File

@ -3397,14 +3397,16 @@ BOOL WINAPI GetCharWidthI(HDC hdc, UINT first, UINT count, LPWORD glyphs, LPINT
*/
DWORD WINAPI GetFontUnicodeRanges(HDC hdc, LPGLYPHSET lpgs)
{
DWORD ret = 0;
DWORD ret;
PHYSDEV dev;
DC *dc = get_dc_ptr(hdc);
TRACE("(%p, %p)\n", hdc, lpgs);
if (!dc) return 0;
if (dc->gdiFont) ret = WineEngGetFontUnicodeRanges(dc->gdiFont, lpgs);
dev = GET_DC_PHYSDEV( dc, pGetFontUnicodeRanges );
ret = dev->funcs->pGetFontUnicodeRanges( dev, lpgs );
release_dc_ptr(dc);
return ret;
}

View File

@ -6675,11 +6675,21 @@ static DWORD get_font_unicode_ranges(FT_Face face, GLYPHSET *gs)
return num_ranges;
}
DWORD WineEngGetFontUnicodeRanges(GdiFont *font, LPGLYPHSET glyphset)
/*************************************************************
* freetype_GetFontUnicodeRanges
*/
static DWORD freetype_GetFontUnicodeRanges( PHYSDEV dev, LPGLYPHSET glyphset )
{
DWORD size = 0;
DWORD num_ranges = get_font_unicode_ranges(font->ft_face, glyphset);
struct freetype_physdev *physdev = get_freetype_dev( dev );
DWORD size, num_ranges;
if (!physdev->font)
{
dev = GET_NEXT_PHYSDEV( dev, pGetFontUnicodeRanges );
return dev->funcs->pGetFontUnicodeRanges( dev, glyphset );
}
num_ranges = get_font_unicode_ranges(physdev->font->ft_face, glyphset);
size = sizeof(GLYPHSET) + sizeof(WCRANGE) * (num_ranges - 1);
if (glyphset)
{
@ -7072,7 +7082,7 @@ static const struct gdi_dc_funcs freetype_funcs =
NULL, /* pGetDeviceCaps */
NULL, /* pGetDeviceGammaRamp */
NULL, /* pGetFontData */
NULL, /* pGetFontUnicodeRanges */
freetype_GetFontUnicodeRanges, /* pGetFontUnicodeRanges */
NULL, /* pGetGlyphIndices */
NULL, /* pGetGlyphOutline */
NULL, /* pGetICMProfile */
@ -7245,12 +7255,6 @@ BOOL WineEngGetLinkedHFont(DC *dc, WCHAR c, HFONT *new_hfont, UINT *glyph)
return FALSE;
}
DWORD WineEngGetFontUnicodeRanges(GdiFont *font, LPGLYPHSET glyphset)
{
FIXME("(%p, %p): stub\n", font, glyphset);
return 0;
}
BOOL WineEngFontIsLinked(GdiFont *font)
{
return FALSE;

View File

@ -293,7 +293,6 @@ extern INT WineEngAddFontResourceEx(LPCWSTR, DWORD, PVOID) DECLSPEC_HIDDEN;
extern HANDLE WineEngAddFontMemResourceEx(PVOID, DWORD, PVOID, LPDWORD) DECLSPEC_HIDDEN;
extern BOOL WineEngDestroyFontInstance(HFONT handle) DECLSPEC_HIDDEN;
extern DWORD WineEngGetFontData(GdiFont*, DWORD, DWORD, LPVOID, DWORD) DECLSPEC_HIDDEN;
extern DWORD WineEngGetFontUnicodeRanges(GdiFont *, LPGLYPHSET) DECLSPEC_HIDDEN;
extern DWORD WineEngGetGlyphIndices(GdiFont *font, LPCWSTR lpstr, INT count,
LPWORD pgi, DWORD flags) DECLSPEC_HIDDEN;
extern DWORD WineEngGetGlyphOutline(GdiFont*, UINT glyph, UINT format,