Alexandre Julliard : wineps: Chain to the next driver when not using a device font.
Alexandre Julliard
julliard at winehq.org
Thu Oct 20 14:25:11 CDT 2011
Module: wine
Branch: master
Commit: c66b6112058ca6042b0459cb061d82ef8f6098bc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c66b6112058ca6042b0459cb061d82ef8f6098bc
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Oct 18 21:58:25 2011 +0200
wineps: Chain to the next driver when not using a device font.
---
dlls/wineps.drv/builtin.c | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/dlls/wineps.drv/builtin.c b/dlls/wineps.drv/builtin.c
index c74f1a6..16c67f8 100644
--- a/dlls/wineps.drv/builtin.c
+++ b/dlls/wineps.drv/builtin.c
@@ -264,7 +264,11 @@ BOOL PSDRV_GetTextMetrics(PHYSDEV dev, TEXTMETRICW *metrics)
{
PSDRV_PDEVICE *physDev = get_psdrv_dev( dev );
- assert(physDev->font.fontloc == Builtin);
+ if (physDev->font.fontloc == Download)
+ {
+ dev = GET_NEXT_PHYSDEV( dev, pGetTextMetrics );
+ return dev->funcs->pGetTextMetrics( dev, metrics );
+ }
memcpy(metrics, &(physDev->font.fontinfo.Builtin.tm),
sizeof(physDev->font.fontinfo.Builtin.tm));
@@ -322,7 +326,11 @@ BOOL PSDRV_GetTextExtentExPoint(PHYSDEV dev, LPCWSTR str, INT count,
float width = 0.0;
float scale;
- assert(physDev->font.fontloc == Builtin);
+ if (physDev->font.fontloc == Download)
+ {
+ dev = GET_NEXT_PHYSDEV( dev, pGetTextExtentExPoint );
+ return dev->funcs->pGetTextExtentExPoint( dev, str, count, maxExt, lpnFit, alpDx, size );
+ }
TRACE("%s %i\n", debugstr_wn(str, count), count);
@@ -357,7 +365,11 @@ BOOL PSDRV_GetCharWidth(PHYSDEV dev, UINT firstChar, UINT lastChar, LPINT buffer
PSDRV_PDEVICE *physDev = get_psdrv_dev( dev );
UINT i;
- assert(physDev->font.fontloc == Builtin);
+ if (physDev->font.fontloc == Download)
+ {
+ dev = GET_NEXT_PHYSDEV( dev, pGetCharWidth );
+ return dev->funcs->pGetCharWidth( dev, firstChar, lastChar, buffer );
+ }
TRACE("U+%.4X U+%.4X\n", firstChar, lastChar);
More information about the wine-cvs
mailing list