wineps: Ensure font size is +ve

Huw D M Davies h.davies1 at physics.ox.ac.uk
Thu Feb 12 09:07:46 CST 2004


        Huw Davies <huw at codeweavers.com>
        Make sure that the font ppem is always +ve.  Thanks to gslink.
-- 
Huw Davies
huw at codeweavers.com
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 15:03:29 -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-patches mailing list