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 | /* ftlzw.h */ |
michael@0 | 4 | /* */ |
michael@0 | 5 | /* LZW-compressed stream support. */ |
michael@0 | 6 | /* */ |
michael@0 | 7 | /* Copyright 2004, 2006 by */ |
michael@0 | 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
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 __FTLZW_H__ |
michael@0 | 20 | #define __FTLZW_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 | /* lzw */ |
michael@0 | 38 | /* */ |
michael@0 | 39 | /* <Title> */ |
michael@0 | 40 | /* LZW Streams */ |
michael@0 | 41 | /* */ |
michael@0 | 42 | /* <Abstract> */ |
michael@0 | 43 | /* Using LZW-compressed font files. */ |
michael@0 | 44 | /* */ |
michael@0 | 45 | /* <Description> */ |
michael@0 | 46 | /* This section contains the declaration of LZW-specific functions. */ |
michael@0 | 47 | /* */ |
michael@0 | 48 | /*************************************************************************/ |
michael@0 | 49 | |
michael@0 | 50 | /************************************************************************ |
michael@0 | 51 | * |
michael@0 | 52 | * @function: |
michael@0 | 53 | * FT_Stream_OpenLZW |
michael@0 | 54 | * |
michael@0 | 55 | * @description: |
michael@0 | 56 | * Open a new stream to parse LZW-compressed font files. This is |
michael@0 | 57 | * mainly used to support the compressed `*.pcf.Z' fonts that come |
michael@0 | 58 | * with XFree86. |
michael@0 | 59 | * |
michael@0 | 60 | * @input: |
michael@0 | 61 | * stream :: The target embedding stream. |
michael@0 | 62 | * |
michael@0 | 63 | * source :: The source stream. |
michael@0 | 64 | * |
michael@0 | 65 | * @return: |
michael@0 | 66 | * FreeType error code. 0~means success. |
michael@0 | 67 | * |
michael@0 | 68 | * @note: |
michael@0 | 69 | * The source stream must be opened _before_ calling this function. |
michael@0 | 70 | * |
michael@0 | 71 | * Calling the internal function `FT_Stream_Close' on the new stream will |
michael@0 | 72 | * *not* call `FT_Stream_Close' on the source stream. None of the stream |
michael@0 | 73 | * objects will be released to the heap. |
michael@0 | 74 | * |
michael@0 | 75 | * The stream implementation is very basic and resets the decompression |
michael@0 | 76 | * process each time seeking backwards is needed within the stream |
michael@0 | 77 | * |
michael@0 | 78 | * In certain builds of the library, LZW compression recognition is |
michael@0 | 79 | * automatically handled when calling @FT_New_Face or @FT_Open_Face. |
michael@0 | 80 | * This means that if no font driver is capable of handling the raw |
michael@0 | 81 | * compressed file, the library will try to open a LZW stream from it |
michael@0 | 82 | * and re-open the face with it. |
michael@0 | 83 | * |
michael@0 | 84 | * This function may return `FT_Err_Unimplemented_Feature' if your build |
michael@0 | 85 | * of FreeType was not compiled with LZW support. |
michael@0 | 86 | */ |
michael@0 | 87 | FT_EXPORT( FT_Error ) |
michael@0 | 88 | FT_Stream_OpenLZW( FT_Stream stream, |
michael@0 | 89 | FT_Stream source ); |
michael@0 | 90 | |
michael@0 | 91 | /* */ |
michael@0 | 92 | |
michael@0 | 93 | |
michael@0 | 94 | FT_END_HEADER |
michael@0 | 95 | |
michael@0 | 96 | #endif /* __FTLZW_H__ */ |
michael@0 | 97 | |
michael@0 | 98 | |
michael@0 | 99 | /* END */ |