Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /***************************************************************************/ |
michael@0 | 2 | /* */ |
michael@0 | 3 | /* ftbzip2.h */ |
michael@0 | 4 | /* */ |
michael@0 | 5 | /* Bzip2-compressed stream support. */ |
michael@0 | 6 | /* */ |
michael@0 | 7 | /* Copyright 2010 by */ |
michael@0 | 8 | /* Joel Klinghed. */ |
michael@0 | 9 | /* */ |
michael@0 | 10 | /* This file is part of the FreeType project, and may only be used, */ |
michael@0 | 11 | /* modified, and distributed under the terms of the FreeType project */ |
michael@0 | 12 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
michael@0 | 13 | /* this file you indicate that you have read the license and */ |
michael@0 | 14 | /* understand and accept it fully. */ |
michael@0 | 15 | /* */ |
michael@0 | 16 | /***************************************************************************/ |
michael@0 | 17 | |
michael@0 | 18 | |
michael@0 | 19 | #ifndef __FTBZIP2_H__ |
michael@0 | 20 | #define __FTBZIP2_H__ |
michael@0 | 21 | |
michael@0 | 22 | #include <ft2build.h> |
michael@0 | 23 | #include FT_FREETYPE_H |
michael@0 | 24 | |
michael@0 | 25 | #ifdef FREETYPE_H |
michael@0 | 26 | #error "freetype.h of FreeType 1 has been loaded!" |
michael@0 | 27 | #error "Please fix the directory search order for header files" |
michael@0 | 28 | #error "so that freetype.h of FreeType 2 is found first." |
michael@0 | 29 | #endif |
michael@0 | 30 | |
michael@0 | 31 | |
michael@0 | 32 | FT_BEGIN_HEADER |
michael@0 | 33 | |
michael@0 | 34 | /*************************************************************************/ |
michael@0 | 35 | /* */ |
michael@0 | 36 | /* <Section> */ |
michael@0 | 37 | /* bzip2 */ |
michael@0 | 38 | /* */ |
michael@0 | 39 | /* <Title> */ |
michael@0 | 40 | /* BZIP2 Streams */ |
michael@0 | 41 | /* */ |
michael@0 | 42 | /* <Abstract> */ |
michael@0 | 43 | /* Using bzip2-compressed font files. */ |
michael@0 | 44 | /* */ |
michael@0 | 45 | /* <Description> */ |
michael@0 | 46 | /* This section contains the declaration of Bzip2-specific functions. */ |
michael@0 | 47 | /* */ |
michael@0 | 48 | /*************************************************************************/ |
michael@0 | 49 | |
michael@0 | 50 | |
michael@0 | 51 | /************************************************************************ |
michael@0 | 52 | * |
michael@0 | 53 | * @function: |
michael@0 | 54 | * FT_Stream_OpenBzip2 |
michael@0 | 55 | * |
michael@0 | 56 | * @description: |
michael@0 | 57 | * Open a new stream to parse bzip2-compressed font files. This is |
michael@0 | 58 | * mainly used to support the compressed `*.pcf.bz2' fonts that come |
michael@0 | 59 | * with XFree86. |
michael@0 | 60 | * |
michael@0 | 61 | * @input: |
michael@0 | 62 | * stream :: |
michael@0 | 63 | * The target embedding stream. |
michael@0 | 64 | * |
michael@0 | 65 | * source :: |
michael@0 | 66 | * The source stream. |
michael@0 | 67 | * |
michael@0 | 68 | * @return: |
michael@0 | 69 | * FreeType error code. 0~means success. |
michael@0 | 70 | * |
michael@0 | 71 | * @note: |
michael@0 | 72 | * The source stream must be opened _before_ calling this function. |
michael@0 | 73 | * |
michael@0 | 74 | * Calling the internal function `FT_Stream_Close' on the new stream will |
michael@0 | 75 | * *not* call `FT_Stream_Close' on the source stream. None of the stream |
michael@0 | 76 | * objects will be released to the heap. |
michael@0 | 77 | * |
michael@0 | 78 | * The stream implementation is very basic and resets the decompression |
michael@0 | 79 | * process each time seeking backwards is needed within the stream. |
michael@0 | 80 | * |
michael@0 | 81 | * In certain builds of the library, bzip2 compression recognition is |
michael@0 | 82 | * automatically handled when calling @FT_New_Face or @FT_Open_Face. |
michael@0 | 83 | * This means that if no font driver is capable of handling the raw |
michael@0 | 84 | * compressed file, the library will try to open a bzip2 compressed stream |
michael@0 | 85 | * from it and re-open the face with it. |
michael@0 | 86 | * |
michael@0 | 87 | * This function may return `FT_Err_Unimplemented_Feature' if your build |
michael@0 | 88 | * of FreeType was not compiled with bzip2 support. |
michael@0 | 89 | */ |
michael@0 | 90 | FT_EXPORT( FT_Error ) |
michael@0 | 91 | FT_Stream_OpenBzip2( FT_Stream stream, |
michael@0 | 92 | FT_Stream source ); |
michael@0 | 93 | |
michael@0 | 94 | /* */ |
michael@0 | 95 | |
michael@0 | 96 | |
michael@0 | 97 | FT_END_HEADER |
michael@0 | 98 | |
michael@0 | 99 | #endif /* __FTBZIP2_H__ */ |
michael@0 | 100 | |
michael@0 | 101 | |
michael@0 | 102 | /* END */ |