sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Loading...
Searching...
No Matches
ft-hb-types.h
Go to the documentation of this file.
1/*
2 * Copyright © 2009, 2023 Red Hat, Inc.
3 * Copyright © 2015 Google, Inc.
4 *
5 * Permission is hereby granted, without written agreement and without
6 * license or royalty fees, to use, copy, modify, and distribute this
7 * software and its documentation for any purpose, provided that the
8 * above copyright notice and the following two paragraphs appear in
9 * all copies of this software.
10 *
11 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
12 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
13 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
14 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
15 * DAMAGE.
16 *
17 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
18 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
19 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
20 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
21 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
22 *
23 * Red Hat Author(s): Behdad Esfahbod, Matthias Clasen
24 * Google Author(s): Behdad Esfahbod
25 */
26
27
28 /* This file is a condensed version of the public HarfBuzz header file */
29 /* `hb-common.h`, also including some additional HarfBuzz declarations */
30 /* and macros. It allows FreeType to load HarfBuzz dynamically without */
31 /* actually using its header files. */
32
33
38#ifndef FT_HB_TYPES_H
39#define FT_HB_TYPES_H
40
41#if defined (_AIX)
42# include <sys/inttypes.h>
43#elif defined (_MSC_VER) && _MSC_VER < 1600
44/* VS 2010 (_MSC_VER 1600) has stdint.h */
45typedef __int8 int8_t;
46typedef unsigned __int8 uint8_t;
47typedef __int16 int16_t;
48typedef unsigned __int16 uint16_t;
49typedef __int32 int32_t;
50typedef unsigned __int32 uint32_t;
51typedef __int64 int64_t;
52typedef unsigned __int64 uint64_t;
53#elif defined (_MSC_VER) && _MSC_VER < 1800
54/* VS 2013 (_MSC_VER 1800) has inttypes.h */
55# include <stdint.h>
56#else
57# include <inttypes.h>
58#endif
59#include <stddef.h>
60
61typedef int hb_bool_t;
62typedef uint32_t hb_codepoint_t;
63#define HB_CODEPOINT_INVALID ((hb_codepoint_t) -1)
64typedef uint32_t hb_tag_t;
65
66#define HB_TAG(c1,c2,c3,c4) ((hb_tag_t)((((uint32_t)(c1)&0xFF)<<24)|(((uint32_t)(c2)&0xFF)<<16)|(((uint32_t)(c3)&0xFF)<<8)|((uint32_t)(c4)&0xFF)))
67#define HB_TAG_NONE HB_TAG(0,0,0,0)
68#define HB_TAG_MAX_SIGNED HB_TAG(0x7f,0xff,0xff,0xff)
69#define HB_OT_TAG_DEFAULT_SCRIPT HB_TAG ('D', 'F', 'L', 'T')
70#define HB_OT_TAG_GPOS HB_TAG('G','P','O','S')
71#define HB_OT_TAG_GSUB HB_TAG('G','S','U','B')
72
73typedef int32_t hb_position_t;
74typedef uint32_t hb_mask_t;
75
76typedef enum {
77 HB_DIRECTION_INVALID = 0,
78 HB_DIRECTION_LTR = 4,
79 HB_DIRECTION_RTL,
80 HB_DIRECTION_TTB,
81 HB_DIRECTION_BTT
82} hb_direction_t;
83typedef enum {
84 HB_MEMORY_MODE_DUPLICATE,
85 HB_MEMORY_MODE_READONLY,
86 HB_MEMORY_MODE_WRITABLE,
87 HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE
88} hb_memory_mode_t;
89
90#define HB_NO_SINGLE_HEADER_ERROR
91#include "hb-script-list.h"
92#undef HB_NO_SINGLE_HEADER_ERROR
93
94typedef const struct hb_language_impl_t *hb_language_t;
95#define HB_LANGUAGE_INVALID ((hb_language_t) 0)
96#define HB_SET_VALUE_INVALID HB_CODEPOINT_INVALID
97
98typedef struct hb_feature_t {
99 hb_tag_t tag;
100 uint32_t value;
101 unsigned int start;
102 unsigned int end;
104
105#define HB_FEATURE_GLOBAL_START 0
106#define HB_FEATURE_GLOBAL_END ((unsigned int) -1)
107
108typedef struct hb_glyph_info_t {
109 hb_codepoint_t codepoint;
110 hb_mask_t mask;
111 uint32_t cluster;
112 uint32_t var1;
113 uint32_t var2;
115
116typedef struct hb_glyph_position_t {
117 hb_position_t x_advance;
118 hb_position_t y_advance;
119 hb_position_t x_offset;
120 hb_position_t y_offset;
121 uint32_t var;
123
124typedef struct hb_blob_t hb_blob_t;
125typedef struct hb_buffer_t hb_buffer_t;
126typedef struct hb_face_t hb_face_t;
127typedef struct hb_font_t hb_font_t;
128typedef struct hb_set_t hb_set_t;
129
130typedef void (*hb_destroy_func_t) (void *data);
131typedef hb_blob_t * (*hb_reference_table_func_t) (hb_face_t *face, hb_tag_t tag, void *user_data);
132
133#endif /* FT_HB_TYPES_H */