sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Loading...
Searching...
No Matches
ftlzw.h
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * ftlzw.h
4 *
5 * LZW-compressed stream support.
6 *
7 * Copyright (C) 2004-2025 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
18
23#ifndef FTLZW_H_
24#define FTLZW_H_
25
26#include <freetype/freetype.h>
27
28#ifdef FREETYPE_H
29#error "freetype.h of FreeType 1 has been loaded!"
30#error "Please fix the directory search order for header files"
31#error "so that freetype.h of FreeType 2 is found first."
32#endif
33
34
35FT_BEGIN_HEADER
36
37 /**************************************************************************
38 *
39 * @section:
40 * lzw
41 *
42 * @title:
43 * LZW Streams
44 *
45 * @abstract:
46 * Using LZW-compressed font files.
47 *
48 * @description:
49 * In certain builds of the library, LZW compression recognition is
50 * automatically handled when calling @FT_New_Face or @FT_Open_Face.
51 * This means that if no font driver is capable of handling the raw
52 * compressed file, the library will try to open a LZW stream from it and
53 * re-open the face with it.
54 *
55 * The stream implementation is very basic and resets the decompression
56 * process each time seeking backwards is needed within the stream,
57 * which significantly undermines the performance.
58 *
59 * This section contains the declaration of LZW-specific functions.
60 *
61 */
62
63 /**************************************************************************
64 *
65 * @function:
66 * FT_Stream_OpenLZW
67 *
68 * @description:
69 * Open a new stream to parse LZW-compressed font files. This is mainly
70 * used to support the compressed `*.pcf.Z` fonts that come with XFree86.
71 *
72 * @input:
73 * stream ::
74 * The target embedding stream.
75 *
76 * source ::
77 * The source stream.
78 *
79 * @return:
80 * FreeType error code. 0~means success.
81 *
82 * @note:
83 * The source stream must be opened _before_ calling this function.
84 *
85 * Calling the internal function `FT_Stream_Close` on the new stream will
86 * **not** call `FT_Stream_Close` on the source stream. None of the
87 * stream objects will be released to the heap.
88 *
89 * This function may return `FT_Err_Unimplemented_Feature` if your build
90 * of FreeType was not compiled with LZW support.
91 */
92 FT_EXPORT( FT_Error )
93 FT_Stream_OpenLZW( FT_Stream stream,
94 FT_Stream source );
95
96 /* */
97
98
99FT_END_HEADER
100
101#endif /* FTLZW_H_ */
102
103
104/* END */