[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#352133: marked as done (gs-gpl: Font rendering on 64bit platforms)



Your message dated Wed, 18 Oct 2006 03:22:14 +0900
with message-id <20061017182217.9DFD17227B9@marx.e.u-tokyo.ac.jp>
and subject line (no subject)
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: gs-gpl
Version: 8.15-4.1
Severity: important


On amd64 certain ps and pdf files (for instance ones created by OpenOffice)
are incorrectly rendered in very small text size, both on screen and printout.

The newest (non-GPL) upstream version fixes this, see also
http://bugs.ghostscript.com/show_bug.cgi?id=688047.

The bug is caused by the implicit assumption that 'long' is 32bit in three headers.
Attached below is a patch to fix this based on my understanding of the issue.

  Arne


--- gs-gpl-8.15-orig/src/ttfoutl.h	2003-12-12 23:08:05.000000000 +0100
+++ gs-gpl-8.15/src/ttfoutl.h	2006-02-09 22:47:05.000000000 +0100
@@ -20,6 +20,8 @@
 #ifndef incl_ttfoutl
 #define incl_ttfoutl
 
+#include "stdint_.h"
+
 #ifndef TFace_defined
 #define TFace_defined
 typedef struct _TFace TFace;
@@ -52,7 +54,7 @@
     double x, y;
 } FloatPoint;
 
-typedef signed long F26Dot6;
+typedef int32_t F26Dot6;
 
 /* Define an abstract class for accessing memory managers from the TT interpreter. */
 typedef struct ttfMemory_s ttfMemory;
--- gs-gpl-8.15-orig/src/tttype.h	2003-12-12 23:08:05.000000000 +0100
+++ gs-gpl-8.15/src/tttype.h	2006-02-09 22:49:05.000000000 +0100
@@ -49,6 +49,8 @@
 #ifndef FREETYPE_H
 #define FREETYPE_H
 
+#include "stdint_.h"
+
 #ifdef __cplusplus
   extern "C" {
 #endif
@@ -62,15 +64,15 @@
   /*                                                                 */
   /*******************************************************************/
 
-  typedef signed long     TT_Fixed;   /* Signed Fixed 16.16 Float */
+  typedef int32_t         TT_Fixed;   /* Signed Fixed 16.16 Float */
 
   typedef signed short    TT_FWord;   /* Distance in FUnits */
   typedef unsigned short  TT_UFWord;  /* Unsigned distance */
 
   typedef signed short    TT_Short;
   typedef unsigned short  TT_UShort;
-  typedef signed long     TT_Long;
-  typedef unsigned long   TT_ULong;
+  typedef int32_t         TT_Long;
+  typedef uint32_t        TT_ULong;
 
   typedef signed short    TT_F2Dot14; /* Signed fixed float 2.14 used for */
                                       /* unary vectors, with layout:      */
@@ -85,10 +87,10 @@
                                       /*  added.                          */
                                       /*                                  */
 
-  typedef signed long     TT_F26Dot6; /* 26.6 fixed float, used for       */
+  typedef int32_t         TT_F26Dot6; /* 26.6 fixed float, used for       */
                                       /* glyph points pixel coordinates.  */
 
-  typedef signed long     TT_Pos;     /* point position, expressed either */
+  typedef int32_t         TT_Pos;     /* point position, expressed either */
                                       /* in fractional pixels or notional */
                                       /* units, depending on context. For */
                                       /* example, glyph coordinates       */
--- gs-gpl-8.15-orig/src/tttypes.h	2003-12-12 23:08:05.000000000 +0100
+++ gs-gpl-8.15/src/tttypes.h	2006-02-09 22:46:09.000000000 +0100
@@ -65,19 +65,7 @@
   typedef unsigned long   ULong;
   typedef signed   long   Long;
 
-#if SIZEOF_INT == 4
-
-  typedef long int        Fixed;    /* signed fixed 16.16 float */
-
-#elif SIZEOF_LONG == 4
-
-  typedef long            Fixed;    /* signed fixed 16.16 float */
-
-#else
-
-#error "no 32bit type found"
-
-#endif
+  typedef int32_t         Fixed;    /* signed fixed 16.16 float */
 
   typedef int             Int;
 
@@ -117,7 +105,7 @@
 #define NULL  (void*)0
 #endif
 
-  typedef long*  PStorage;
+  typedef int32_t*  PStorage;
 
 
 /* Rounding mode constants */




--- End Message ---
--- Begin Message ---
I am pretty sure this bug has gone by the arrival of gs-gpl 8.54.
Close this now.

--
Masayuki Hatta
Graduate School of Economics, The University of Tokyo

--- End Message ---

Reply to: