diff options
author | marha <marha@users.sourceforge.net> | 2011-07-18 08:30:47 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-07-18 08:30:47 +0200 |
commit | d8e3f99cdf46297afeb26fe15ad30f7c6de8ee7c (patch) | |
tree | 199776414c3aa9aab0a35c1d16d38c7a072d6665 /freetype/src/pcf | |
parent | 7723537ddbe5dd4070f2bebbd4e0c93be3244b18 (diff) | |
download | vcxsrv-d8e3f99cdf46297afeb26fe15ad30f7c6de8ee7c.tar.gz vcxsrv-d8e3f99cdf46297afeb26fe15ad30f7c6de8ee7c.tar.bz2 vcxsrv-d8e3f99cdf46297afeb26fe15ad30f7c6de8ee7c.zip |
Switched to freetype 2.4.5
Diffstat (limited to 'freetype/src/pcf')
-rw-r--r-- | freetype/src/pcf/README | 26 | ||||
-rw-r--r-- | freetype/src/pcf/pcf.h | 6 | ||||
-rw-r--r-- | freetype/src/pcf/pcfdrivr.c | 44 | ||||
-rw-r--r-- | freetype/src/pcf/pcfread.c | 10 |
4 files changed, 44 insertions, 42 deletions
diff --git a/freetype/src/pcf/README b/freetype/src/pcf/README index cc1480b2d..8858d68ca 100644 --- a/freetype/src/pcf/README +++ b/freetype/src/pcf/README @@ -31,29 +31,11 @@ on linux/alpha. Encodings ********* -The variety of encodings that accompanies pcf fonts appears to encompass the -small set defined in freetype.h. On the other hand, each pcf font defines -two properties that specify encoding and registry. +Use `FT_Get_BDF_Charset_ID' to access the encoding and registry. -I decided to make these two properties directly accessible, leaving to the -client application the work of interpreting them. For instance: - - #include "pcftypes.h" /* include/freetype/internal/pcftypes.h */ - - FT_Face face; - PCF_Public_Face pcfface; - - FT_New_Face( library,..., &face ); - - pcfface = (PCF_Public_Face)face; - - if ((pcfface->charset_registry == "ISO10646") && - (pcfface->charset_encoding) == "1")) [..] - -Thus the driver always export `ft_encoding_none' as -face->charmap.encoding. FT_Get_Char_Index() behavior is unmodified, that -is, it converts the ULong value given as argument into the corresponding -glyph number. +The driver always exports `ft_encoding_none' as face->charmap.encoding. +FT_Get_Char_Index() behavior is unmodified, that is, it converts the ULong +value given as argument into the corresponding glyph number. Known problems diff --git a/freetype/src/pcf/pcf.h b/freetype/src/pcf/pcf.h index 1cd56c13a..af0ffc337 100644 --- a/freetype/src/pcf/pcf.h +++ b/freetype/src/pcf/pcf.h @@ -2,7 +2,7 @@ FreeType font driver for pcf fonts - Copyright (C) 2000, 2001, 2002, 2003, 2006 by + Copyright (C) 2000, 2001, 2002, 2003, 2006, 2010 by Francesco Zappa Nardelli Permission is hereby granted, free of charge, to any person obtaining a copy @@ -136,8 +136,8 @@ FT_BEGIN_HEADER { FT_FaceRec root; - FT_StreamRec gzip_stream; - FT_Stream gzip_source; + FT_StreamRec comp_stream; + FT_Stream comp_source; char* charset_encoding; char* charset_registry; diff --git a/freetype/src/pcf/pcfdrivr.c b/freetype/src/pcf/pcfdrivr.c index 6c0aa0f9e..af2a2d986 100644 --- a/freetype/src/pcf/pcfdrivr.c +++ b/freetype/src/pcf/pcfdrivr.c @@ -2,7 +2,8 @@ FreeType font driver for pcf files - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 by + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009, + 2010 by Francesco Zappa Nardelli Permission is hereby granted, free of charge, to any person obtaining a copy @@ -32,6 +33,7 @@ THE SOFTWARE. #include FT_INTERNAL_OBJECTS_H #include FT_GZIP_H #include FT_LZW_H +#include FT_BZIP2_H #include FT_ERRORS_H #include FT_BDF_H #include FT_TRUETYPE_IDS_H @@ -248,11 +250,11 @@ THE SOFTWARE. FT_TRACE4(( "PCF_Face_Done: done face\n" )); - /* close gzip/LZW stream if any */ - if ( pcfface->stream == &face->gzip_stream ) + /* close compressed stream if any */ + if ( pcfface->stream == &face->comp_stream ) { - FT_Stream_Close( &face->gzip_stream ); - pcfface->stream = face->gzip_source; + FT_Stream_Close( &face->comp_stream ); + pcfface->stream = face->comp_source; } } @@ -277,8 +279,9 @@ THE SOFTWARE. { PCF_Face_Done( pcfface ); -#if defined( FT_CONFIG_OPTION_USE_ZLIB ) || \ - defined( FT_CONFIG_OPTION_USE_LZW ) +#if defined( FT_CONFIG_OPTION_USE_ZLIB ) || \ + defined( FT_CONFIG_OPTION_USE_LZW ) || \ + defined( FT_CONFIG_OPTION_USE_BZIP2 ) #ifdef FT_CONFIG_OPTION_USE_ZLIB { @@ -286,7 +289,7 @@ THE SOFTWARE. /* this didn't work, try gzip support! */ - error2 = FT_Stream_OpenGzip( &face->gzip_stream, stream ); + error2 = FT_Stream_OpenGzip( &face->comp_stream, stream ); if ( FT_ERROR_BASE( error2 ) == FT_Err_Unimplemented_Feature ) goto Fail; @@ -301,7 +304,7 @@ THE SOFTWARE. /* this didn't work, try LZW support! */ - error3 = FT_Stream_OpenLZW( &face->gzip_stream, stream ); + error3 = FT_Stream_OpenLZW( &face->comp_stream, stream ); if ( FT_ERROR_BASE( error3 ) == FT_Err_Unimplemented_Feature ) goto Fail; @@ -309,11 +312,26 @@ THE SOFTWARE. } #endif /* FT_CONFIG_OPTION_USE_LZW */ +#ifdef FT_CONFIG_OPTION_USE_BZIP2 + if ( error ) + { + FT_Error error4; + + + /* this didn't work, try Bzip2 support! */ + error4 = FT_Stream_OpenBzip2( &face->comp_stream, stream ); + if ( FT_ERROR_BASE( error4 ) == FT_Err_Unimplemented_Feature ) + goto Fail; + + error = error4; + } +#endif /* FT_CONFIG_OPTION_USE_BZIP2 */ + if ( error ) goto Fail; - face->gzip_source = stream; - pcfface->stream = &face->gzip_stream; + face->comp_source = stream; + pcfface->stream = &face->comp_stream; stream = pcfface->stream; @@ -321,7 +339,9 @@ THE SOFTWARE. if ( error ) goto Fail; -#else /* !(FT_CONFIG_OPTION_USE_ZLIB || FT_CONFIG_OPTION_USE_LZW) */ +#else /* !(FT_CONFIG_OPTION_USE_ZLIB || + FT_CONFIG_OPTION_USE_LZW || + FT_CONFIG_OPTION_USE_BZIP2) */ goto Fail; diff --git a/freetype/src/pcf/pcfread.c b/freetype/src/pcf/pcfread.c index f7326238c..f8c2a239b 100644 --- a/freetype/src/pcf/pcfread.c +++ b/freetype/src/pcf/pcfread.c @@ -399,7 +399,7 @@ THE SOFTWARE. PCF_Face face ) { PCF_ParseProperty props = 0; - PCF_Property properties; + PCF_Property properties = NULL; FT_ULong nprops, i; FT_ULong format, size; FT_Error error; @@ -663,9 +663,9 @@ THE SOFTWARE. pcf_get_bitmaps( FT_Stream stream, PCF_Face face ) { - FT_Error error = PCF_Err_Ok; - FT_Memory memory = FT_FACE(face)->memory; - FT_Long* offsets; + FT_Error error = PCF_Err_Ok; + FT_Memory memory = FT_FACE(face)->memory; + FT_Long* offsets = NULL; FT_Long bitmapSizes[GLYPHPADOPTIONS]; FT_ULong format, size; FT_ULong nbitmaps, i, sizebitmaps = 0; @@ -772,7 +772,7 @@ THE SOFTWARE. int firstRow, lastRow; int nencoding, encodingOffset; int i, j; - PCF_Encoding tmpEncoding, encoding = 0; + PCF_Encoding tmpEncoding = NULL, encoding = 0; error = pcf_seek_to_table_type( stream, |