1/*
2 * Copyright (C) 1998-2004 David Turner and Werner Lemberg
3 * Copyright (C) 2006 Behdad Esfahbod
4 *
5 * This is part of HarfBuzz, an OpenType Layout engine library.
6 *
7 * Permission is hereby granted, without written agreement and without
8 * license or royalty fees, to use, copy, modify, and distribute this
9 * software and its documentation for any purpose, provided that the
10 * above copyright notice and the following two paragraphs appear in
11 * all copies of this software.
12 *
13 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
14 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
15 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
16 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
17 * DAMAGE.
18 *
19 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
20 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
21 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
22 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
23 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
24 */
25
26#ifndef HARFBUZZ_GDEF_PRIVATE_H
27#define HARFBUZZ_GDEF_PRIVATE_H
28
29#include "harfbuzz-impl.h"
30#include "harfbuzz-stream-private.h"
31#include "harfbuzz-buffer-private.h"
32#include "harfbuzz-gdef.h"
33
34HB_BEGIN_HEADER
35
36/* Attachment related structures */
37
38struct HB_AttachPoint_
39{
40 HB_UShort* PointIndex; /* array of contour points */
41 HB_UShort PointCount; /* size of the PointIndex array */
42};
43
44/* Ligature Caret related structures */
45
46struct HB_CaretValueFormat1_
47{
48 HB_Short Coordinate; /* x or y value (in design units) */
49};
50
51typedef struct HB_CaretValueFormat1_ HB_CaretValueFormat1;
52
53
54struct HB_CaretValueFormat2_
55{
56 HB_UShort CaretValuePoint; /* contour point index on glyph */
57};
58
59typedef struct HB_CaretValueFormat2_ HB_CaretValueFormat2;
60
61
62struct HB_CaretValueFormat3_
63{
64 HB_Device* Device; /* Device table for x or y value */
65 HB_Short Coordinate; /* x or y value (in design units) */
66};
67
68typedef struct HB_CaretValueFormat3_ HB_CaretValueFormat3;
69
70
71#ifdef HB_SUPPORT_MULTIPLE_MASTER
72struct HB_CaretValueFormat4_
73{
74 HB_UShort IdCaretValue; /* metric ID */
75};
76
77typedef struct HB_CaretValueFormat4_ HB_CaretValueFormat4;
78#endif
79
80
81struct HB_CaretValue_
82{
83 union
84 {
85 HB_CaretValueFormat1 cvf1;
86 HB_CaretValueFormat2 cvf2;
87 HB_CaretValueFormat3 cvf3;
88#ifdef HB_SUPPORT_MULTIPLE_MASTER
89 HB_CaretValueFormat4 cvf4;
90#endif
91 } cvf;
92
93 HB_Byte CaretValueFormat; /* 1, 2, 3, or 4 */
94};
95
96typedef struct HB_CaretValue_ HB_CaretValue;
97
98
99struct HB_LigGlyph_
100{
101 HB_CaretValue* CaretValue; /* array of caret values */
102 HB_UShort CaretCount; /* number of caret values */
103 HB_Bool loaded;
104};
105
106
107HB_INTERNAL HB_Error
108_HB_GDEF_Add_Glyph_Property( HB_GDEFHeader* gdef,
109 HB_UShort glyphID,
110 HB_UShort property );
111
112HB_INTERNAL HB_Error
113_HB_GDEF_Check_Property( HB_GDEFHeader* gdef,
114 HB_GlyphItem item,
115 HB_UShort flags,
116 HB_UShort* property );
117
118HB_INTERNAL HB_Error
119_HB_GDEF_LoadMarkAttachClassDef_From_LookupFlags( HB_GDEFHeader* gdef,
120 HB_Stream input,
121 HB_Lookup* lo,
122 HB_UShort num_lookups );
123
124HB_END_HEADER
125
126#endif /* HARFBUZZ_GDEF_PRIVATE_H */
127

source code of qtbase/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h