vrshoot
diff libs/ft2static/freetype/ftgzip.h @ 0:b2f14e535253
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 01 Feb 2014 19:58:19 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/libs/ft2static/freetype/ftgzip.h Sat Feb 01 19:58:19 2014 +0200 1.3 @@ -0,0 +1,102 @@ 1.4 +/***************************************************************************/ 1.5 +/* */ 1.6 +/* ftgzip.h */ 1.7 +/* */ 1.8 +/* Gzip-compressed stream support. */ 1.9 +/* */ 1.10 +/* Copyright 2002, 2003, 2004, 2006 by */ 1.11 +/* David Turner, Robert Wilhelm, and Werner Lemberg. */ 1.12 +/* */ 1.13 +/* This file is part of the FreeType project, and may only be used, */ 1.14 +/* modified, and distributed under the terms of the FreeType project */ 1.15 +/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 1.16 +/* this file you indicate that you have read the license and */ 1.17 +/* understand and accept it fully. */ 1.18 +/* */ 1.19 +/***************************************************************************/ 1.20 + 1.21 + 1.22 +#ifndef __FTGZIP_H__ 1.23 +#define __FTGZIP_H__ 1.24 + 1.25 +#include <ft2build.h> 1.26 +#include FT_FREETYPE_H 1.27 + 1.28 +#ifdef FREETYPE_H 1.29 +#error "freetype.h of FreeType 1 has been loaded!" 1.30 +#error "Please fix the directory search order for header files" 1.31 +#error "so that freetype.h of FreeType 2 is found first." 1.32 +#endif 1.33 + 1.34 + 1.35 +FT_BEGIN_HEADER 1.36 + 1.37 + /*************************************************************************/ 1.38 + /* */ 1.39 + /* <Section> */ 1.40 + /* gzip */ 1.41 + /* */ 1.42 + /* <Title> */ 1.43 + /* GZIP Streams */ 1.44 + /* */ 1.45 + /* <Abstract> */ 1.46 + /* Using gzip-compressed font files. */ 1.47 + /* */ 1.48 + /* <Description> */ 1.49 + /* This section contains the declaration of Gzip-specific functions. */ 1.50 + /* */ 1.51 + /*************************************************************************/ 1.52 + 1.53 + 1.54 + /************************************************************************ 1.55 + * 1.56 + * @function: 1.57 + * FT_Stream_OpenGzip 1.58 + * 1.59 + * @description: 1.60 + * Open a new stream to parse gzip-compressed font files. This is 1.61 + * mainly used to support the compressed `*.pcf.gz' fonts that come 1.62 + * with XFree86. 1.63 + * 1.64 + * @input: 1.65 + * stream :: 1.66 + * The target embedding stream. 1.67 + * 1.68 + * source :: 1.69 + * The source stream. 1.70 + * 1.71 + * @return: 1.72 + * FreeType error code. 0~means success. 1.73 + * 1.74 + * @note: 1.75 + * The source stream must be opened _before_ calling this function. 1.76 + * 1.77 + * Calling the internal function `FT_Stream_Close' on the new stream will 1.78 + * *not* call `FT_Stream_Close' on the source stream. None of the stream 1.79 + * objects will be released to the heap. 1.80 + * 1.81 + * The stream implementation is very basic and resets the decompression 1.82 + * process each time seeking backwards is needed within the stream. 1.83 + * 1.84 + * In certain builds of the library, gzip compression recognition is 1.85 + * automatically handled when calling @FT_New_Face or @FT_Open_Face. 1.86 + * This means that if no font driver is capable of handling the raw 1.87 + * compressed file, the library will try to open a gzipped stream from 1.88 + * it and re-open the face with it. 1.89 + * 1.90 + * This function may return `FT_Err_Unimplemented_Feature' if your build 1.91 + * of FreeType was not compiled with zlib support. 1.92 + */ 1.93 + FT_EXPORT( FT_Error ) 1.94 + FT_Stream_OpenGzip( FT_Stream stream, 1.95 + FT_Stream source ); 1.96 + 1.97 + /* */ 1.98 + 1.99 + 1.100 +FT_END_HEADER 1.101 + 1.102 +#endif /* __FTGZIP_H__ */ 1.103 + 1.104 + 1.105 +/* END */