winex11: Chain to the next driver when not using a device font.

This commit is contained in:
Alexandre Julliard 2011-10-18 21:58:06 +02:00
parent a37ea54183
commit f00767807f
2 changed files with 18 additions and 7 deletions

View file

@ -43,16 +43,21 @@ BOOL X11DRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
RGNDATA *saved_region = NULL;
unsigned int i;
fontObject* pfo;
fontObject* pfo = XFONT_GetFontObject( physDev->font );
XFontStruct* font;
BOOL rotated = FALSE;
XChar2b *str2b = NULL;
BOOL dibUpdateFlag = FALSE;
BOOL result = TRUE;
if (!pfo)
{
dev = GET_NEXT_PHYSDEV( dev, pExtTextOut );
return dev->funcs->pExtTextOut( dev, x, y, flags, lprect, wstr, count, lpDx );
}
if (!X11DRV_SetupGCForText( physDev )) return TRUE;
pfo = XFONT_GetFontObject( physDev->font );
font = pfo->fs;
if (pfo->lf.lfEscapement && pfo->lpX11Trans)
@ -232,5 +237,7 @@ BOOL X11DRV_GetTextExtentExPoint( PHYSDEV dev, LPCWSTR str, INT count,
HeapFree( GetProcessHeap(), 0, p );
return TRUE;
}
return FALSE;
dev = GET_NEXT_PHYSDEV( dev, pGetTextExtentExPoint );
return dev->funcs->pGetTextExtentExPoint( dev, str, count, maxExt, lpnFit, alpDx, size );
}

View file

@ -3391,14 +3391,16 @@ BOOL X11DRV_EnumDeviceFonts( PHYSDEV dev, LPLOGFONTW plf, FONTENUMPROCW proc, LP
BOOL X11DRV_GetTextMetrics(PHYSDEV dev, TEXTMETRICW *metrics)
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
fontObject *pfo = XFONT_GetFontObject( physDev->font );
if( CHECK_PFONT(physDev->font) )
if (pfo)
{
fontObject* pfo = __PFONT(physDev->font);
X11DRV_cptable[pfo->fi->cptable].pGetTextMetricsW( pfo, metrics );
return TRUE;
}
return FALSE;
dev = GET_NEXT_PHYSDEV( dev, pGetTextMetrics );
return dev->funcs->pGetTextMetrics( dev, metrics );
}
@ -3452,5 +3454,7 @@ BOOL X11DRV_GetCharWidth( PHYSDEV dev, UINT firstChar, UINT lastChar, LPINT buff
return TRUE;
}
return FALSE;
dev = GET_NEXT_PHYSDEV( dev, pGetCharWidth );
return dev->funcs->pGetCharWidth( dev, firstChar, lastChar, buffer );
}