sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Loading...
Searching...
No Matches
sfwoff2.h
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * sfwoff2.h
4 *
5 * WOFFF2 format management (specification).
6 *
7 * Copyright (C) 2019-2025 by
8 * Nikhil Ramakrishnan, 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 SFWOFF2_H_
24#define SFWOFF2_H_
25
26
29
30
31FT_BEGIN_HEADER
32
33#ifdef FT_CONFIG_OPTION_USE_BROTLI
34
35 /* Leave the first byte open to store `flag_byte'. */
36#define WOFF2_FLAGS_TRANSFORM 1 << 8
37
38#define WOFF2_SFNT_HEADER_SIZE 12
39#define WOFF2_SFNT_ENTRY_SIZE 16
40
41 /* Suggested maximum size for output. */
42#define WOFF2_DEFAULT_MAX_SIZE 30 * 1024 * 1024
43
44 /* 98% of Google Fonts have no glyph above 5k bytes. */
45#define WOFF2_DEFAULT_GLYPH_BUF 5120
46
47 /* Composite glyph flags. */
48 /* See `CompositeGlyph.java' in `sfntly' for full definitions. */
49#define FLAG_ARG_1_AND_2_ARE_WORDS 1 << 0
50#define FLAG_WE_HAVE_A_SCALE 1 << 3
51#define FLAG_MORE_COMPONENTS 1 << 5
52#define FLAG_WE_HAVE_AN_X_AND_Y_SCALE 1 << 6
53#define FLAG_WE_HAVE_A_TWO_BY_TWO 1 << 7
54#define FLAG_WE_HAVE_INSTRUCTIONS 1 << 8
55
56 /* Simple glyph flags */
57#define GLYF_ON_CURVE 1 << 0
58#define GLYF_X_SHORT 1 << 1
59#define GLYF_Y_SHORT 1 << 2
60#define GLYF_REPEAT 1 << 3
61#define GLYF_THIS_X_IS_SAME 1 << 4
62#define GLYF_THIS_Y_IS_SAME 1 << 5
63#define GLYF_OVERLAP_SIMPLE 1 << 6
64
65 /* Other constants */
66#define CONTOUR_OFFSET_END_POINT 10
67
68
69 FT_LOCAL( FT_Error )
70 woff2_open_font( FT_Stream stream,
71 TT_Face face,
72 FT_Int* face_index,
73 FT_Long* num_faces );
74
75#endif /* FT_CONFIG_OPTION_USE_BROTLI */
76
77FT_END_HEADER
78
79#endif /* SFWOFF2_H_ */
80
81
82/* END */