ftlzw.h
上传用户:yisoukefu
上传日期:2020-08-09
资源大小:39506k
文件大小:4k
源码类别:

其他游戏

开发平台:

Visual C++

  1. /***************************************************************************/
  2. /*                                                                         */
  3. /*  ftlzw.h                                                                */
  4. /*                                                                         */
  5. /*    LZW-compressed stream support.                                       */
  6. /*                                                                         */
  7. /*  Copyright 2004, 2006 by                                                */
  8. /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
  9. /*                                                                         */
  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.                                        */
  15. /*                                                                         */
  16. /***************************************************************************/
  17. #ifndef __FTLZW_H__
  18. #define __FTLZW_H__
  19. #include <ft2build.h>
  20. #include FT_FREETYPE_H
  21. #ifdef FREETYPE_H
  22. #error "freetype.h of FreeType 1 has been loaded!"
  23. #error "Please fix the directory search order for header files"
  24. #error "so that freetype.h of FreeType 2 is found first."
  25. #endif
  26. FT_BEGIN_HEADER
  27.   /*************************************************************************/
  28.   /*                                                                       */
  29.   /* <Section>                                                             */
  30.   /*    lzw                                                                */
  31.   /*                                                                       */
  32.   /* <Title>                                                               */
  33.   /*    LZW Streams                                                        */
  34.   /*                                                                       */
  35.   /* <Abstract>                                                            */
  36.   /*    Using LZW-compressed font files.                                   */
  37.   /*                                                                       */
  38.   /* <Description>                                                         */
  39.   /*    This section contains the declaration of LZW-specific functions.   */
  40.   /*                                                                       */
  41.   /*************************************************************************/
  42.  /************************************************************************
  43.   *
  44.   * @function:
  45.   *   FT_Stream_OpenLZW
  46.   *
  47.   * @description:
  48.   *   Open a new stream to parse LZW-compressed font files.  This is
  49.   *   mainly used to support the compressed `*.pcf.Z' fonts that come
  50.   *   with XFree86.
  51.   *
  52.   * @input:
  53.   *   stream :: The target embedding stream.
  54.   *
  55.   *   source :: The source stream.
  56.   *
  57.   * @return:
  58.   *   FreeType error code.  0 means success.
  59.   *
  60.   * @note:
  61.   *   The source stream must be opened _before_ calling this function.
  62.   *
  63.   *   Calling the internal function `FT_Stream_Close' on the new stream will
  64.   *   *not* call `FT_Stream_Close' on the source stream.  None of the stream
  65.   *   objects will be released to the heap.
  66.   *
  67.   *   The stream implementation is very basic and resets the decompression
  68.   *   process each time seeking backwards is needed within the stream
  69.   *
  70.   *   In certain builds of the library, LZW compression recognition is
  71.   *   automatically handled when calling @FT_New_Face or @FT_Open_Face.
  72.   *   This means that if no font driver is capable of handling the raw
  73.   *   compressed file, the library will try to open a LZW stream from it
  74.   *   and re-open the face with it.
  75.   *
  76.   *   This function may return `FT_Err_Unimplemented_Feature' if your build
  77.   *   of FreeType was not compiled with LZW support.
  78.   */
  79.   FT_EXPORT( FT_Error )
  80.   FT_Stream_OpenLZW( FT_Stream  stream,
  81.                      FT_Stream  source );
  82.  /* */
  83. FT_END_HEADER
  84. #endif /* __FTLZW_H__ */
  85. /* END */