gdi32: Implement GetCharABCWidthsI as a standard driver entry point.
This commit is contained in:
parent
e5a0fa7089
commit
27208a0ec5
|
@ -2434,8 +2434,9 @@ BOOL WINAPI GetCharABCWidthsI( HDC hdc, UINT firstChar, UINT count,
|
||||||
LPWORD pgi, LPABC abc)
|
LPWORD pgi, LPABC abc)
|
||||||
{
|
{
|
||||||
DC *dc = get_dc_ptr(hdc);
|
DC *dc = get_dc_ptr(hdc);
|
||||||
|
PHYSDEV dev;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
BOOL ret = FALSE;
|
BOOL ret;
|
||||||
|
|
||||||
if (!dc) return FALSE;
|
if (!dc) return FALSE;
|
||||||
|
|
||||||
|
@ -2445,11 +2446,8 @@ BOOL WINAPI GetCharABCWidthsI( HDC hdc, UINT firstChar, UINT count,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(dc->gdiFont)
|
dev = GET_DC_PHYSDEV( dc, pGetCharABCWidthsI );
|
||||||
ret = WineEngGetCharABCWidthsI( dc->gdiFont, firstChar, count, pgi, abc );
|
ret = dev->funcs->pGetCharABCWidthsI( dev, firstChar, count, pgi, abc );
|
||||||
else
|
|
||||||
FIXME(": stub\n");
|
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
/* convert device units to logical */
|
/* convert device units to logical */
|
||||||
|
@ -2458,7 +2456,6 @@ BOOL WINAPI GetCharABCWidthsI( HDC hdc, UINT firstChar, UINT count,
|
||||||
abc->abcB = INTERNAL_XDSTOWS(dc, abc->abcB);
|
abc->abcB = INTERNAL_XDSTOWS(dc, abc->abcB);
|
||||||
abc->abcC = INTERNAL_XDSTOWS(dc, abc->abcC);
|
abc->abcC = INTERNAL_XDSTOWS(dc, abc->abcC);
|
||||||
}
|
}
|
||||||
ret = TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
release_dc_ptr( dc );
|
release_dc_ptr( dc );
|
||||||
|
|
|
@ -6419,25 +6419,30 @@ BOOL WineEngGetCharABCWidthsFloat(GdiFont *font, UINT first, UINT last, LPABCFLO
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
* WineEngGetCharABCWidthsI
|
* freetype_GetCharABCWidthsI
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
BOOL WineEngGetCharABCWidthsI(GdiFont *font, UINT firstChar, UINT count, LPWORD pgi,
|
static BOOL freetype_GetCharABCWidthsI( PHYSDEV dev, UINT firstChar, UINT count, LPWORD pgi, LPABC buffer )
|
||||||
LPABC buffer)
|
|
||||||
{
|
{
|
||||||
static const MAT2 identity = { {0,1},{0,0},{0,0},{0,1} };
|
static const MAT2 identity = { {0,1},{0,0},{0,0},{0,1} };
|
||||||
UINT c;
|
UINT c;
|
||||||
GLYPHMETRICS gm;
|
GLYPHMETRICS gm;
|
||||||
FT_UInt glyph_index;
|
FT_UInt glyph_index;
|
||||||
GdiFont *linked_font;
|
GdiFont *linked_font;
|
||||||
|
struct freetype_physdev *physdev = get_freetype_dev( dev );
|
||||||
|
|
||||||
if(!FT_HAS_HORIZONTAL(font->ft_face))
|
if (!physdev->font)
|
||||||
|
{
|
||||||
|
dev = GET_NEXT_PHYSDEV( dev, pGetCharABCWidthsI );
|
||||||
|
return dev->funcs->pGetCharABCWidthsI( dev, firstChar, count, pgi, buffer );
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!FT_HAS_HORIZONTAL(physdev->font->ft_face))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
GDI_CheckNotLock();
|
GDI_CheckNotLock();
|
||||||
EnterCriticalSection( &freetype_cs );
|
EnterCriticalSection( &freetype_cs );
|
||||||
|
|
||||||
get_glyph_index_linked(font, 'a', &linked_font, &glyph_index);
|
get_glyph_index_linked(physdev->font, 'a', &linked_font, &glyph_index);
|
||||||
if (!pgi)
|
if (!pgi)
|
||||||
for(c = firstChar; c < firstChar+count; c++) {
|
for(c = firstChar; c < firstChar+count; c++) {
|
||||||
get_glyph_outline(linked_font, c, GGO_METRICS | GGO_GLYPH_INDEX,
|
get_glyph_outline(linked_font, c, GGO_METRICS | GGO_GLYPH_INDEX,
|
||||||
|
@ -7094,7 +7099,7 @@ static const struct gdi_dc_funcs freetype_funcs =
|
||||||
NULL, /* pGdiComment */
|
NULL, /* pGdiComment */
|
||||||
NULL, /* pGdiRealizationInfo */
|
NULL, /* pGdiRealizationInfo */
|
||||||
freetype_GetCharABCWidths, /* pGetCharABCWidths */
|
freetype_GetCharABCWidths, /* pGetCharABCWidths */
|
||||||
NULL, /* pGetCharABCWidthsI */
|
freetype_GetCharABCWidthsI, /* pGetCharABCWidthsI */
|
||||||
freetype_GetCharWidth, /* pGetCharWidth */
|
freetype_GetCharWidth, /* pGetCharWidth */
|
||||||
NULL, /* pGetDeviceCaps */
|
NULL, /* pGetDeviceCaps */
|
||||||
NULL, /* pGetDeviceGammaRamp */
|
NULL, /* pGetDeviceGammaRamp */
|
||||||
|
@ -7229,13 +7234,6 @@ BOOL WineEngGetCharABCWidthsFloat(GdiFont *font, UINT first, UINT last, LPABCFLO
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL WineEngGetCharABCWidthsI(GdiFont *font, UINT firstChar, UINT count, LPWORD pgi,
|
|
||||||
LPABC buffer)
|
|
||||||
{
|
|
||||||
ERR("called but we don't have FreeType\n");
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL WineEngGetTextExtentExPointI(GdiFont *font, const WORD *indices, INT count,
|
BOOL WineEngGetTextExtentExPointI(GdiFont *font, const WORD *indices, INT count,
|
||||||
INT max_ext, LPINT nfit, LPINT dx, LPSIZE size)
|
INT max_ext, LPINT nfit, LPINT dx, LPSIZE size)
|
||||||
{
|
{
|
||||||
|
|
|
@ -294,8 +294,6 @@ extern HANDLE WineEngAddFontMemResourceEx(PVOID, DWORD, PVOID, LPDWORD) DECLSPEC
|
||||||
extern BOOL WineEngDestroyFontInstance(HFONT handle) DECLSPEC_HIDDEN;
|
extern BOOL WineEngDestroyFontInstance(HFONT handle) DECLSPEC_HIDDEN;
|
||||||
extern BOOL WineEngGetCharABCWidthsFloat(GdiFont *font, UINT firstChar,
|
extern BOOL WineEngGetCharABCWidthsFloat(GdiFont *font, UINT firstChar,
|
||||||
UINT lastChar, LPABCFLOAT buffer) DECLSPEC_HIDDEN;
|
UINT lastChar, LPABCFLOAT buffer) DECLSPEC_HIDDEN;
|
||||||
extern BOOL WineEngGetCharABCWidthsI(GdiFont *font, UINT firstChar,
|
|
||||||
UINT count, LPWORD pgi, LPABC buffer) DECLSPEC_HIDDEN;
|
|
||||||
extern DWORD WineEngGetFontData(GdiFont*, DWORD, DWORD, LPVOID, DWORD) DECLSPEC_HIDDEN;
|
extern DWORD WineEngGetFontData(GdiFont*, DWORD, DWORD, LPVOID, DWORD) DECLSPEC_HIDDEN;
|
||||||
extern DWORD WineEngGetFontUnicodeRanges(GdiFont *, LPGLYPHSET) DECLSPEC_HIDDEN;
|
extern DWORD WineEngGetFontUnicodeRanges(GdiFont *, LPGLYPHSET) DECLSPEC_HIDDEN;
|
||||||
extern DWORD WineEngGetGlyphIndices(GdiFont *font, LPCWSTR lpstr, INT count,
|
extern DWORD WineEngGetGlyphIndices(GdiFont *font, LPCWSTR lpstr, INT count,
|
||||||
|
|
Loading…
Reference in New Issue