1 /***************************************************************************/
5 /* Gzip-compressed stream support. */
7 /* Copyright 2002, 2003, 2004 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
10 /* This file is part of the FreeType project, and may only be used, */
11 /* modified, and distributed under the terms of the FreeType project */
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13 /* this file you indicate that you have read the license and */
14 /* understand and accept it fully. */
16 /***************************************************************************/
23 #include FT_FREETYPE_H
26 #error "freetype.h of FreeType 1 has been loaded!"
27 #error "Please fix the directory search order for header files"
28 #error "so that freetype.h of FreeType 2 is found first."
34 /*************************************************************************/
43 /* Using gzip-compressed font files. */
46 /* This section contains the declaration of Gzip-specific functions. */
48 /*************************************************************************/
51 /************************************************************************
57 * Open a new stream to parse gzip-compressed font files. This is
58 * mainly used to support the compressed *.pcf.gz fonts that come
62 * stream :: The target embedding stream.
64 * source :: The source stream.
67 * FreeType error code. 0 means success.
70 * The source stream must be opened _before_ calling this function.
72 * Calling the internal function FT_Stream_Close on the new stream will
73 * *not* call FT_Stream_Close on the source stream. None of the stream
74 * objects will be released to the heap.
76 * The stream implementation is very basic and resets the decompression
77 * process each time seeking backwards is needed within the stream.
79 * In certain builds of the library, gzip compression recognition is
80 * automatically handled when calling @FT_New_Face or @FT_Open_Face.
81 * This means that if no font driver is capable of handling the raw
82 * compressed file, the library will try to open a gzipped stream from
83 * it and re-open the face with it.
85 * This function may return "FT_Err_Unimplemented" if your build of
86 * FreeType was not compiled with zlib support.
89 FT_Stream_OpenGzip( FT_Stream stream,
97 #endif /* __FTGZIP_H__ */