ftgzip.h

Go to the documentation of this file.
00001 /***************************************************************************/
00002 /*                                                                         */
00003 /*  ftgzip.h                                                               */
00004 /*                                                                         */
00005 /*    Gzip-compressed stream support.                                      */
00006 /*                                                                         */
00007 /*  Copyright 2002, 2003, 2004, 2006 by                                    */
00008 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
00009 /*                                                                         */
00010 /*  This file is part of the FreeType project, and may only be used,       */
00011 /*  modified, and distributed under the terms of the FreeType project      */
00012 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
00013 /*  this file you indicate that you have read the license and              */
00014 /*  understand and accept it fully.                                        */
00015 /*                                                                         */
00016 /***************************************************************************/
00017 
00018 
00019 #ifndef __FTGZIP_H__
00020 #define __FTGZIP_H__
00021 
00022 #include <ft2build.h>
00023 #include FT_FREETYPE_H
00024 
00025 #ifdef FREETYPE_H
00026 #error "freetype.h of FreeType 1 has been loaded!"
00027 #error "Please fix the directory search order for header files"
00028 #error "so that freetype.h of FreeType 2 is found first."
00029 #endif
00030 
00031 
00032 FT_BEGIN_HEADER
00033 
00034   /*************************************************************************/
00035   /*                                                                       */
00036   /* <Section>                                                             */
00037   /*    gzip                                                               */
00038   /*                                                                       */
00039   /* <Title>                                                               */
00040   /*    GZIP Streams                                                       */
00041   /*                                                                       */
00042   /* <Abstract>                                                            */
00043   /*    Using gzip-compressed font files.                                  */
00044   /*                                                                       */
00045   /* <Description>                                                         */
00046   /*    This section contains the declaration of Gzip-specific functions.  */
00047   /*                                                                       */
00048   /*************************************************************************/
00049 
00050 
00051  /************************************************************************
00052   *
00053   * @function:
00054   *   FT_Stream_OpenGzip
00055   *
00056   * @description:
00057   *   Open a new stream to parse gzip-compressed font files.  This is
00058   *   mainly used to support the compressed `*.pcf.gz' fonts that come
00059   *   with XFree86.
00060   *
00061   * @input:
00062   *   stream ::
00063   *     The target embedding stream.
00064   *
00065   *   source ::
00066   *     The source stream.
00067   *
00068   * @return:
00069   *   FreeType error code.  0~means success.
00070   *
00071   * @note:
00072   *   The source stream must be opened _before_ calling this function.
00073   *
00074   *   Calling the internal function `FT_Stream_Close' on the new stream will
00075   *   *not* call `FT_Stream_Close' on the source stream.  None of the stream
00076   *   objects will be released to the heap.
00077   *
00078   *   The stream implementation is very basic and resets the decompression
00079   *   process each time seeking backwards is needed within the stream.
00080   *
00081   *   In certain builds of the library, gzip compression recognition is
00082   *   automatically handled when calling @FT_New_Face or @FT_Open_Face.
00083   *   This means that if no font driver is capable of handling the raw
00084   *   compressed file, the library will try to open a gzipped stream from
00085   *   it and re-open the face with it.
00086   *
00087   *   This function may return `FT_Err_Unimplemented_Feature' if your build
00088   *   of FreeType was not compiled with zlib support.
00089   */
00090   FT_EXPORT( FT_Error )
00091   FT_Stream_OpenGzip( FT_Stream  stream,
00092                       FT_Stream  source );
00093 
00094  /* */
00095 
00096 
00097 FT_END_HEADER
00098 
00099 #endif /* __FTGZIP_H__ */
00100 
00101 
00102 /* END */

Generated on Tue Jul 5 14:13:36 2011 for ROOT_528-00b_version by  doxygen 1.5.1