gdi32: Don't pass a DC handle to WineEngGetFontUnicodeRanges.
This commit is contained in:
parent
1abc24d29c
commit
543270dfb5
|
@ -3411,5 +3411,14 @@ BOOL WINAPI GetCharWidthI(HDC hdc, UINT first, UINT count, LPWORD glyphs, LPINT
|
||||||
*/
|
*/
|
||||||
DWORD WINAPI GetFontUnicodeRanges(HDC hdc, LPGLYPHSET lpgs)
|
DWORD WINAPI GetFontUnicodeRanges(HDC hdc, LPGLYPHSET lpgs)
|
||||||
{
|
{
|
||||||
return WineEngGetFontUnicodeRanges(hdc, lpgs);
|
DWORD ret = 0;
|
||||||
|
DC *dc = DC_GetDCPtr(hdc);
|
||||||
|
|
||||||
|
TRACE("(%p, %p)\n", hdc, lpgs);
|
||||||
|
|
||||||
|
if (!dc) return 0;
|
||||||
|
|
||||||
|
if (dc->gdiFont) ret = WineEngGetFontUnicodeRanges(dc->gdiFont, lpgs);
|
||||||
|
DC_ReleaseDCPtr(dc);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4634,28 +4634,17 @@ static DWORD get_font_unicode_ranges(FT_Face face, GLYPHSET *gs)
|
||||||
return num_ranges;
|
return num_ranges;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD WineEngGetFontUnicodeRanges(HDC hdc, LPGLYPHSET glyphset)
|
DWORD WineEngGetFontUnicodeRanges(GdiFont *font, LPGLYPHSET glyphset)
|
||||||
{
|
{
|
||||||
DWORD size = 0;
|
DWORD size = 0;
|
||||||
DC *dc = DC_GetDCPtr(hdc);
|
DWORD num_ranges = get_font_unicode_ranges(font->ft_face, glyphset);
|
||||||
|
|
||||||
TRACE("(%p, %p)\n", hdc, glyphset);
|
size = sizeof(GLYPHSET) + sizeof(WCRANGE) * (num_ranges - 1);
|
||||||
|
if (glyphset)
|
||||||
if (!dc) return 0;
|
|
||||||
|
|
||||||
if (dc->gdiFont)
|
|
||||||
{
|
{
|
||||||
DWORD num_ranges = get_font_unicode_ranges(dc->gdiFont->ft_face, glyphset);
|
glyphset->cbThis = size;
|
||||||
|
glyphset->cRanges = num_ranges;
|
||||||
size = sizeof(GLYPHSET) + sizeof(WCRANGE) * (num_ranges - 1);
|
|
||||||
if (glyphset)
|
|
||||||
{
|
|
||||||
glyphset->cbThis = size;
|
|
||||||
glyphset->cRanges = num_ranges;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DC_ReleaseDCPtr(dc);
|
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5079,7 +5068,7 @@ BOOL WineEngGetLinkedHFont(DC *dc, WCHAR c, HFONT *new_hfont, UINT *glyph)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD WineEngGetFontUnicodeRanges(HDC hdc, LPGLYPHSET glyphset)
|
DWORD WineEngGetFontUnicodeRanges(GdiFont *font, LPGLYPHSET glyphset)
|
||||||
{
|
{
|
||||||
FIXME("(%p, %p): stub\n", hdc, glyphset);
|
FIXME("(%p, %p): stub\n", hdc, glyphset);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -430,7 +430,7 @@ extern BOOL WineEngGetCharABCWidthsI(GdiFont *font, UINT firstChar,
|
||||||
UINT count, LPWORD pgi, LPABC buffer);
|
UINT count, LPWORD pgi, LPABC buffer);
|
||||||
extern BOOL WineEngGetCharWidth(GdiFont*, UINT, UINT, LPINT);
|
extern BOOL WineEngGetCharWidth(GdiFont*, UINT, UINT, LPINT);
|
||||||
extern DWORD WineEngGetFontData(GdiFont*, DWORD, DWORD, LPVOID, DWORD);
|
extern DWORD WineEngGetFontData(GdiFont*, DWORD, DWORD, LPVOID, DWORD);
|
||||||
extern DWORD WineEngGetFontUnicodeRanges(HDC, LPGLYPHSET);
|
extern DWORD WineEngGetFontUnicodeRanges(GdiFont *, LPGLYPHSET);
|
||||||
extern DWORD WineEngGetGlyphIndices(GdiFont *font, LPCWSTR lpstr, INT count,
|
extern DWORD WineEngGetGlyphIndices(GdiFont *font, LPCWSTR lpstr, INT count,
|
||||||
LPWORD pgi, DWORD flags);
|
LPWORD pgi, DWORD flags);
|
||||||
extern DWORD WineEngGetGlyphOutline(GdiFont*, UINT glyph, UINT format,
|
extern DWORD WineEngGetGlyphOutline(GdiFont*, UINT glyph, UINT format,
|
||||||
|
|
Loading…
Reference in New Issue