diff options
author | marha <marha@users.sourceforge.net> | 2011-07-18 10:51:09 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-07-18 10:51:09 +0200 |
commit | 3c0d2312573b81e3067bea610a58b1940c075e05 (patch) | |
tree | 3f025a27d813374f225957801226aa8ee829a33a /freetype/src/pcf | |
parent | ba033884541714680fd7552ab9d6c8817650f7d8 (diff) | |
parent | 88101146f2ec7d53ffb793e365f05097ffd35fd3 (diff) | |
download | vcxsrv-3c0d2312573b81e3067bea610a58b1940c075e05.tar.gz vcxsrv-3c0d2312573b81e3067bea610a58b1940c075e05.tar.bz2 vcxsrv-3c0d2312573b81e3067bea610a58b1940c075e05.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
X11/Xfuncproto.h.in
X11/configure.ac
X11/keysymdef.h
freetype/include/freetype/internal/pcftypes.h
freetype/src/cache/ftcbasic.c
freetype/src/cache/ftccmap.c
mesalib/src/glsl/ir.h
mesalib/src/glsl/link_functions.cpp
mesalib/src/mesa/main/dlist.c
mesalib/src/mesa/program/prog_optimize.c
mesalib/src/mesa/state_tracker/st_program.c
pthreads/Makefile
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 12e845eac..78549020b 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 14c507e07..30acc7fb1 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 <freetype/internal/ftobjs.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 596445e86..e08da6e72 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, |