Huw Davies : wineps.drv: Only fail printer dc creation if the printer has no builtin fonts and there are no TrueType fonts to download .

Alexandre Julliard julliard at wine.codeweavers.com
Wed Aug 29 07:48:14 CDT 2007


Module: wine
Branch: master
Commit: dba09770921e6f4583a4b79226ed4f38d5520126
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=dba09770921e6f4583a4b79226ed4f38d5520126

Author: Huw Davies <huw at codeweavers.com>
Date:   Tue Aug 28 11:46:18 2007 +0100

wineps.drv: Only fail printer dc creation if the printer has no builtin fonts and there are no TrueType fonts to download.

---

 dlls/wineps.drv/init.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dlls/wineps.drv/init.c b/dlls/wineps.drv/init.c
index a794bec..d499247 100644
--- a/dlls/wineps.drv/init.c
+++ b/dlls/wineps.drv/init.c
@@ -328,8 +328,14 @@ BOOL PSDRV_CreateDC( HDC hdc, PSDRV_PDEVICE **pdev, LPCWSTR driver, LPCWSTR devi
     if(!pi) return FALSE;
 
     if(!pi->Fonts) {
-        MESSAGE("To use WINEPS you need to install some AFM files.\n");
-	return FALSE;
+        RASTERIZER_STATUS status;
+        if(!GetRasterizerCaps(&status, sizeof(status)) ||
+           !(status.wFlags & TT_AVAILABLE) ||
+           !(status.wFlags & TT_ENABLED)) {
+            MESSAGE("Disabling printer %s since it has no builtin fonts and there are no TrueType fonts available.\n",
+                    debugstr_w(device));
+            return FALSE;
+        }
     }
 
     physDev = HeapAlloc( PSDRV_Heap, HEAP_ZERO_MEMORY, sizeof(*physDev) );




More information about the wine-cvs mailing list