Compatability problem in wineps driver

Huw D M Davies h.davies1 at
Thu Feb 12 06:15:08 CST 2004

On Tue, Feb 10, 2004 at 12:33:46PM -0500, gslink wrote:
> It appears that a check needs to be made in ps.c.  The method 
> PSDRV_WriteSetFont passes the parameter size.  In some early Win 95 
> versions there was a bug that required that parameter to be negative and 
> some early windows programs make size negative.  This produces garbage. 
>  It appears that Windows checks and if that parameter is negative that 
> it is changed to posative.  I put a patch to make this check into our 
> copies of Wine without any problem but I do not suggest a patch.  I 
> would like the maintainer of the Postscript driver to do that as there 
> is a possibility of other consequences.  It may be that this change can 
> be made in ps.c or it may be that it must be accompanied by a flag in 
> the config file also.  One program that will not run without the patch 
> is DeScribe but I know there are others.

How's this?

Huw Davies
huw at
Index: dlls/wineps/download.c
RCS file: /home/wine/wine/dlls/wineps/download.c,v
retrieving revision 1.9
diff -u -r1.9 download.c
--- dlls/wineps/download.c	20 Jan 2004 22:48:57 -0000	1.9
+++ dlls/wineps/download.c	12 Feb 2004 12:13:12 -0000
@@ -138,10 +138,10 @@
     physDev->font.fontloc = Download;
     physDev->font.fontinfo.Download = is_font_downloaded(physDev, ps_name);
-    physDev->font.size = PSDRV_YWStoDS(physDev, /* ppem */
+    physDev->font.size = abs(PSDRV_YWStoDS(physDev, /* ppem */
                                        potm->otmTextMetrics.tmAscent +
                                        potm->otmTextMetrics.tmDescent -
-                                       potm->otmTextMetrics.tmInternalLeading);
+                                       potm->otmTextMetrics.tmInternalLeading));
     physDev->font.underlineThickness = potm->otmsUnderscoreSize;
     physDev->font.underlinePosition = potm->otmsUnderscorePosition;
     physDev->font.strikeoutThickness = potm->otmsStrikeoutSize;

More information about the wine-devel mailing list