shithub: freetype+ttf2subf

Download patch

ref: 38364152e61e53d164a2f64fdcdf83860ae9840e
parent: 8eb0353fec1494ab7d9fe9bb91a5954449ab30c1
author: Werner Lemberg <[email protected]>
date: Wed Jun 20 04:06:50 EDT 2001

* include/freetype/config/ftconfig.h: Add two more `L's to
constants.
Add missing semicolons.

* builds/toplevel.mk: Do similar change as for
builds/unix/detect.mk.

* include/freetype/freetype.h (FT_ENC_TAG): New version to make it
easier to redefine.
* include/freetype/ftimage.h (FT_IMAGE_TAG): Ditto.

* include/freetype/freetype.h (FT_New_Memory_Face): Updated

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2001-06-20  Werner Lemberg  <[email protected]>
+
+	* include/freetype/config/ftconfig.h: Add two more `L's to
+	constants.
+	Add missing semicolons.
+
+	* builds/toplevel.mk: Do similar change as for
+	builds/unix/detect.mk.
+
+	* include/freetype/freetype.h (FT_ENC_TAG): New version to make it
+	easier to redefine.
+	* include/freetype/ftimage.h (FT_IMAGE_TAG): Ditto.
+
 2001-06-19  David Turner  <[email protected]>
 
 	* builds/win32/visualc/freetype.dsp, builds/win32/visualc/index.html:
@@ -20,7 +33,7 @@
 	listed here, but FT2 now compiles without warnings with VC++ and the
 	"/W4" warning level (lint-style).
 
-        * include/freetype/freetype.h (FT_New_Memory_Face): Updated
+	* include/freetype/freetype.h (FT_New_Memory_Face): Updated
 	documentation.
 	* include/freetype/fttypes.h (FT_BOOL): New macro.
 	* include/freetype/internal/ftdebug.h: Add #pragma for Visual C++
@@ -525,7 +538,7 @@
 	value an unsigned short value, first by shifting right 16 bits,
 	then by casting the results to FT_UShort.
 
-2001-03-17  David Turner   <[email protected]>
+2001-03-17  David Turner  <[email protected]>
 
 	* src/cid/cidobjs.c, src/cid/cidload.c, src/pcf/pcfread.c,
 	src/type1/t1load.c, src/type1/t1objs.c: Added a few casts to remove
--- a/builds/toplevel.mk
+++ b/builds/toplevel.mk
@@ -99,7 +99,7 @@
   #
   # note: This test is duplicated in "builds/toplevel.mk".
   #
-  is_unix := $(strip $(wildcard /sbin/init) $(wildcard /hurd/auth))
+  is_unix := $(strip $(wildcard /sbin/init) $(wildcard /usr/sbin/init) $(wildcard /hurd/auth))
   ifneq ($(is_unix),)
 
     distclean:
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -62,7 +62,7 @@
 #include <limits.h>
 
   /* The number of bytes in an `int' type.  */
-#if   UINT_MAX == 0xFFFFFFFFU
+#if   UINT_MAX == 0xFFFFFFFFUL
 #define FT_SIZEOF_INT  4
 #elif UINT_MAX == 0xFFFFU
 #define FT_SIZEOF_INT  2
@@ -73,7 +73,7 @@
 #endif
 
   /* The number of bytes in a `long' type.  */
-#if   ULONG_MAX == 0xFFFFFFFFU
+#if   ULONG_MAX == 0xFFFFFFFFUL
 #define FT_SIZEOF_LONG  4
 #elif ULONG_MAX > 0xFFFFFFFFU && ULONG_MAX == 0xFFFFFFFFFFFFFFFFU
 #define FT_SIZEOF_LONG  8
@@ -127,7 +127,7 @@
 #error "no 32bit type found -- please check your configuration files"
 #endif
 
-/* now, lookup for an integer type that is at least 32 bits */
+  /* now, lookup for an integer type that is at least 32 bits */
 #if FT_SIZEOF_INT >= 4
 
   typedef int           FT_Fast;
@@ -135,8 +135,8 @@
 
 #elif FT_SIZEOF_LONG >= 4
 
-  typedef long          FT_Fast
-  typedef unsigned long FT_UFast
+  typedef long          FT_Fast;
+  typedef unsigned long FT_UFast;
   
 #endif
 
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -363,11 +363,11 @@
   /*    This macro converts four letter tags into an unsigned long.        */
   /*                                                                       */
 #ifndef FT_ENC_TAG
-#define FT_ENC_TAG( _x1, _x2, _x3, _x4 ) \
-        ( ( (unsigned long)_x1 << 24 ) | \
-          ( (unsigned long)_x2 << 16 ) | \
-          ( (unsigned long)_x3 << 8  ) | \
-            (unsigned long)_x4         )
+#define FT_ENC_TAG( value, _x1, _x2, _x3, _x4 ) \
+        value = ( ( (unsigned long)_x1 << 24 ) | \
+                  ( (unsigned long)_x2 << 16 ) | \
+                  ( (unsigned long)_x3 << 8  ) | \
+                    (unsigned long)_x4         )
 #endif /* FT_ENC_TAG */
 
 
@@ -388,21 +388,22 @@
   /*                                                                       */
   typedef enum  FT_Encoding_
   {
-    ft_encoding_none    = 0,
-    ft_encoding_symbol  = FT_ENC_TAG( 's', 'y', 'm', 'b' ),
-    ft_encoding_unicode = FT_ENC_TAG( 'u', 'n', 'i', 'c' ),
-    ft_encoding_latin_2 = FT_ENC_TAG( 'l', 'a', 't', '2' ),
-    ft_encoding_sjis    = FT_ENC_TAG( 's', 'j', 'i', 's' ),
-    ft_encoding_gb2312  = FT_ENC_TAG( 'g', 'b', ' ', ' ' ),
-    ft_encoding_big5    = FT_ENC_TAG( 'b', 'i', 'g', '5' ),
-    ft_encoding_wansung = FT_ENC_TAG( 'w', 'a', 'n', 's' ),
-    ft_encoding_johab   = FT_ENC_TAG( 'j', 'o', 'h', 'a' ),
+    FT_ENC_TAG( ft_encoding_none, 0, 0, 0, 0 ),
+
+    FT_ENC_TAG( ft_encoding_symbol,  's', 'y', 'm', 'b' ),
+    FT_ENC_TAG( ft_encoding_unicode, 'u', 'n', 'i', 'c' ),
+    FT_ENC_TAG( ft_encoding_latin_2, 'l', 'a', 't', '2' ),
+    FT_ENC_TAG( ft_encoding_sjis,    's', 'j', 'i', 's' ),
+    FT_ENC_TAG( ft_encoding_gb2312,  'g', 'b', ' ', ' ' ),
+    FT_ENC_TAG( ft_encoding_big5,    'b', 'i', 'g', '5' ),
+    FT_ENC_TAG( ft_encoding_wansung, 'w', 'a', 'n', 's' ),
+    FT_ENC_TAG( ft_encoding_johab,   'j', 'o', 'h', 'a' ),
 
-    ft_encoding_adobe_standard = FT_ENC_TAG( 'A', 'D', 'O', 'B' ),
-    ft_encoding_adobe_expert   = FT_ENC_TAG( 'A', 'D', 'B', 'E' ),
-    ft_encoding_adobe_custom   = FT_ENC_TAG( 'A', 'D', 'B', 'C' ),
+    FT_ENC_TAG( ft_encoding_adobe_standard, 'A', 'D', 'O', 'B' ),
+    FT_ENC_TAG( ft_encoding_adobe_expert,   'A', 'D', 'B', 'E' ),
+    FT_ENC_TAG( ft_encoding_adobe_custom,   'A', 'D', 'B', 'C' ),
 
-    ft_encoding_apple_roman    = FT_ENC_TAG( 'a', 'r', 'm', 'n' )
+    FT_ENC_TAG( ft_encoding_apple_roman, 'a', 'r', 'm', 'n' )
 
   } FT_Encoding;
 
--- a/include/freetype/ftimage.h
+++ b/include/freetype/ftimage.h
@@ -577,11 +577,11 @@
   /*    This macro converts four letter tags into an unsigned long.        */
   /*                                                                       */
 #ifndef FT_IMAGE_TAG
-#define FT_IMAGE_TAG( _x1, _x2, _x3, _x4 ) \
-          ( ( (unsigned long)_x1 << 24 ) | \
-            ( (unsigned long)_x2 << 16 ) | \
-            ( (unsigned long)_x3 << 8  ) | \
-              (unsigned long)_x4         )
+#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  \
+          value = ( ( (unsigned long)_x1 << 24 ) | \
+                    ( (unsigned long)_x2 << 16 ) | \
+                    ( (unsigned long)_x3 << 8  ) | \
+                      (unsigned long)_x4         )
 #endif /* FT_IMAGE_TAG */
 
 
@@ -617,11 +617,12 @@
   /*                                                                       */
   typedef enum  FT_Glyph_Format_
   {
-    ft_glyph_format_none      = 0,
-    ft_glyph_format_composite = FT_IMAGE_TAG( 'c', 'o', 'm', 'p' ),
-    ft_glyph_format_bitmap    = FT_IMAGE_TAG( 'b', 'i', 't', 's' ),
-    ft_glyph_format_outline   = FT_IMAGE_TAG( 'o', 'u', 't', 'l' ),
-    ft_glyph_format_plotter   = FT_IMAGE_TAG( 'p', 'l', 'o', 't' )
+    FT_IMAGE_TAG( ft_glyph_format_none, 0, 0, 0, 0 ),
+
+    FT_IMAGE_TAG( ft_glyph_format_composite, 'c', 'o', 'm', 'p' ),
+    FT_IMAGE_TAG( ft_glyph_format_bitmap,    'b', 'i', 't', 's' ),
+    FT_IMAGE_TAG( ft_glyph_format_outline,   'o', 'u', 't', 'l' ),
+    FT_IMAGE_TAG( ft_glyph_format_plotter,   'p', 'l', 'o', 't' )
 
   } FT_Glyph_Format;