ref: 004f3da80a5d9c8a0feebb2bcce80d9b7566c94f
parent: 2541a40d953dfa386a0756fcc536b38675215596
author: Werner Lemberg <[email protected]>
date: Tue Jul 27 20:09:02 EDT 2004
* src/pcf/pcfread.c (pcf_interpret_style): Always allocate memory for face->style_name. * src/pcf/pcfdrivr.c (PCF_Face_Done): Free `style_name'. * include/freetype/config/ftconfig.h (FT_SIZEOF_LONG): Recognize five-byte `long' (which is avoided then).
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2004-07-26 S�ren Sandmann <[email protected]>
+
+ * src/pcf/pcfread.c (pcf_interpret_style): Always allocate memory for
+ face->style_name.
+ * src/pcf/pcfdrivr.c (PCF_Face_Done): Free `style_name'.
+
+2004-07-26 Darren J Longhorn <[email protected]>
+
+ * include/freetype/config/ftconfig.h (FT_SIZEOF_LONG): Recognize
+ five-byte `long' (which is avoided then).
+
2004-07-25 Detlef W�rkner <[email protected]>
* src/pcf/pcfdrivr.c (PCF_Set_Pixel_Size): Compare heights, not
@@ -17,7 +28,7 @@
2004-07-24 Derek B. Noonburg <[email protected]>
* src/cff/cffload.c (cff_font_load): Always create inverse mapping.
- Even if the charstring count id different from the CID count, it is
+ Even if the charstring count is the same as the CID count, it is
still possible that the font uses a different CID -> GID mapping.
2004-07-23 Werner Lemberg <[email protected]>
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -72,20 +72,23 @@
/* The size of an `int' type. */
-#if FT_UINT_MAX == 0xFFFFFFFFUL
-#define FT_SIZEOF_INT (32 / FT_CHAR_BIT)
-#elif FT_UINT_MAX == 0xFFFFU
+#if FT_UINT_MAX == 0xFFFFUL
#define FT_SIZEOF_INT (16 / FT_CHAR_BIT)
-#elif FT_UINT_MAX > 0xFFFFFFFFU && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFU
+#elif FT_UINT_MAX == 0xFFFFFFFFUL
+#define FT_SIZEOF_INT (32 / FT_CHAR_BIT)
+#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL
#define FT_SIZEOF_INT (64 / FT_CHAR_BIT)
#else
#error "Unsupported size of `int' type!"
#endif
- /* The size of a `long' type. */
-#if FT_ULONG_MAX == 0xFFFFFFFFUL
+ /* The size of a `long' type. A five-byte `long' (as used e.g. on the */
+ /* DM642) is recognized but avoided. */
+#if FT_ULONG_MAX == 0xFFFFFFFFUL
#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT)
-#elif FT_ULONG_MAX > 0xFFFFFFFFU && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFU
+#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL
+#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT)
+#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL
#define FT_SIZEOF_LONG (64 / FT_CHAR_BIT)
#else
#error "Unsupported size of `long' type!"
--- a/src/pcf/pcfdrivr.c
+++ b/src/pcf/pcfdrivr.c
@@ -221,6 +221,7 @@
FT_FREE( face->toc.tables );
FT_FREE( pcfface->family_name );
+ FT_FREE( pcfface->style_name );
FT_FREE( pcfface->available_sizes );
FT_FREE( face->charset_encoding );
FT_FREE( face->charset_registry );
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -945,7 +945,12 @@
}
if ( !parts || !len )
- face->style_name = (char *)"Regular";
+ {
+ if ( FT_ALLOC( face->style_name, 8 ) )
+ return error;
+ ft_strcpy( face->style_name, "Regular" );
+ face->style_name[7] = '\0';
+ }
else
{
char *style, *s;