2018-06-03 22:00:42 +02:00
|
|
|
/****************************************************************************
|
|
|
|
*
|
|
|
|
* ftbzip2.h
|
|
|
|
*
|
|
|
|
* Bzip2-compressed stream support.
|
|
|
|
*
|
|
|
|
* Copyright 2010-2018 by
|
|
|
|
* Joel Klinghed.
|
|
|
|
*
|
|
|
|
* This file is part of the FreeType project, and may only be used,
|
|
|
|
* modified, and distributed under the terms of the FreeType project
|
|
|
|
* license, LICENSE.TXT. By continuing to use, modify, or distribute
|
|
|
|
* this file you indicate that you have read the license and
|
|
|
|
* understand and accept it fully.
|
|
|
|
*
|
|
|
|
*/
|
2010-12-31 16:59:33 +01:00
|
|
|
|
|
|
|
|
2016-01-12 21:37:13 +01:00
|
|
|
#ifndef FTBZIP2_H_
|
|
|
|
#define FTBZIP2_H_
|
2010-12-31 16:59:33 +01:00
|
|
|
|
|
|
|
#include <ft2build.h>
|
|
|
|
#include FT_FREETYPE_H
|
|
|
|
|
|
|
|
#ifdef FREETYPE_H
|
|
|
|
#error "freetype.h of FreeType 1 has been loaded!"
|
|
|
|
#error "Please fix the directory search order for header files"
|
|
|
|
#error "so that freetype.h of FreeType 2 is found first."
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
FT_BEGIN_HEADER
|
|
|
|
|
2018-06-03 22:00:42 +02:00
|
|
|
/**************************************************************************
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @section:
|
2018-06-03 22:00:42 +02:00
|
|
|
* bzip2
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @title:
|
2018-06-03 22:00:42 +02:00
|
|
|
* BZIP2 Streams
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @abstract:
|
2018-06-03 22:00:42 +02:00
|
|
|
* Using bzip2-compressed font files.
|
|
|
|
*
|
2018-06-17 21:08:36 +02:00
|
|
|
* @description:
|
2018-06-03 22:00:42 +02:00
|
|
|
* This section contains the declaration of Bzip2-specific functions.
|
|
|
|
*
|
|
|
|
*/
|
2010-12-31 16:59:33 +01:00
|
|
|
|
|
|
|
|
2018-09-04 08:00:58 +02:00
|
|
|
/**************************************************************************
|
2018-06-17 11:22:37 +02:00
|
|
|
*
|
|
|
|
* @function:
|
|
|
|
* FT_Stream_OpenBzip2
|
|
|
|
*
|
|
|
|
* @description:
|
|
|
|
* Open a new stream to parse bzip2-compressed font files. This is
|
2018-08-24 18:52:30 +02:00
|
|
|
* mainly used to support the compressed `*.pcf.bz2` fonts that come with
|
|
|
|
* XFree86.
|
2018-06-17 11:22:37 +02:00
|
|
|
*
|
|
|
|
* @input:
|
|
|
|
* stream ::
|
|
|
|
* The target embedding stream.
|
|
|
|
*
|
|
|
|
* source ::
|
|
|
|
* The source stream.
|
|
|
|
*
|
|
|
|
* @return:
|
|
|
|
* FreeType error code. 0~means success.
|
|
|
|
*
|
|
|
|
* @note:
|
|
|
|
* The source stream must be opened _before_ calling this function.
|
|
|
|
*
|
2018-08-24 18:52:30 +02:00
|
|
|
* Calling the internal function `FT_Stream_Close` on the new stream will
|
|
|
|
* **not** call `FT_Stream_Close` on the source stream. None of the
|
|
|
|
* stream objects will be released to the heap.
|
2018-06-17 11:22:37 +02:00
|
|
|
*
|
|
|
|
* The stream implementation is very basic and resets the decompression
|
|
|
|
* process each time seeking backwards is needed within the stream.
|
|
|
|
*
|
|
|
|
* In certain builds of the library, bzip2 compression recognition is
|
|
|
|
* automatically handled when calling @FT_New_Face or @FT_Open_Face.
|
|
|
|
* This means that if no font driver is capable of handling the raw
|
2018-08-24 18:52:30 +02:00
|
|
|
* compressed file, the library will try to open a bzip2 compressed
|
|
|
|
* stream from it and re-open the face with it.
|
2018-06-17 11:22:37 +02:00
|
|
|
*
|
2018-08-24 18:52:30 +02:00
|
|
|
* This function may return `FT_Err_Unimplemented_Feature` if your build
|
2018-06-17 11:22:37 +02:00
|
|
|
* of FreeType was not compiled with bzip2 support.
|
|
|
|
*/
|
2010-12-31 16:59:33 +01:00
|
|
|
FT_EXPORT( FT_Error )
|
|
|
|
FT_Stream_OpenBzip2( FT_Stream stream,
|
|
|
|
FT_Stream source );
|
|
|
|
|
2014-12-02 23:06:04 +01:00
|
|
|
/* */
|
2010-12-31 16:59:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
FT_END_HEADER
|
|
|
|
|
2016-01-12 21:37:13 +01:00
|
|
|
#endif /* FTBZIP2_H_ */
|
2010-12-31 16:59:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
/* END */
|