* include/freetype/freetype.h (FT_ENC_TAG): New macro. (FT_Encoding_): Use it. * include/freetype/ftimage.h (FT_IMAGE_TAG): Define it conditionally.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
diff --git a/ChangeLog b/ChangeLog
index d174be3..549de61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-06-16 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h (FT_ENC_TAG): New macro.
+ (FT_Encoding_): Use it.
+ * include/freetype/ftimage.h (FT_IMAGE_TAG): Define it
+ conditionally.
+
2001-06-14 David Turner <david@freetype.org>
Modified the TrueType interpreter to let it use the new
diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h
index 7fee26d..3b64b0b 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -356,6 +356,23 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* <Macro> */
+ /* FT_ENC_TAG */
+ /* */
+ /* <Description> */
+ /* 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 )
+#endif /* FT_ENC_TAG */
+
+
+ /*************************************************************************/
+ /* */
/* <Enum> */
/* FT_Encoding */
/* */
@@ -372,20 +389,20 @@ FT_BEGIN_HEADER
typedef enum FT_Encoding_
{
ft_encoding_none = 0,
- ft_encoding_symbol = FT_MAKE_TAG( 's', 'y', 'm', 'b' ),
- ft_encoding_unicode = FT_MAKE_TAG( 'u', 'n', 'i', 'c' ),
- ft_encoding_latin_2 = FT_MAKE_TAG( 'l', 'a', 't', '2' ),
- ft_encoding_sjis = FT_MAKE_TAG( 's', 'j', 'i', 's' ),
- ft_encoding_gb2312 = FT_MAKE_TAG( 'g', 'b', ' ', ' ' ),
- ft_encoding_big5 = FT_MAKE_TAG( 'b', 'i', 'g', '5' ),
- ft_encoding_wansung = FT_MAKE_TAG( 'w', 'a', 'n', 's' ),
- ft_encoding_johab = FT_MAKE_TAG( 'j', 'o', 'h', 'a' ),
-
- ft_encoding_adobe_standard = FT_MAKE_TAG( 'A', 'D', 'O', 'B' ),
- ft_encoding_adobe_expert = FT_MAKE_TAG( 'A', 'D', 'B', 'E' ),
- ft_encoding_adobe_custom = FT_MAKE_TAG( 'A', 'D', 'B', 'C' ),
-
- ft_encoding_apple_roman = FT_MAKE_TAG( 'a', 'r', 'm', 'n' )
+ 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_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_encoding_apple_roman = FT_ENC_TAG( 'a', 'r', 'm', 'n' )
} FT_Encoding;
diff --git a/include/freetype/ftimage.h b/include/freetype/ftimage.h
index aec6db9..ec94e37 100644
--- a/include/freetype/ftimage.h
+++ b/include/freetype/ftimage.h
@@ -576,11 +576,13 @@ FT_BEGIN_HEADER
/* <Description> */
/* 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 )
+#endif /* FT_IMAGE_TAG */
/*************************************************************************/