summaryrefslogtreecommitdiff
path: root/pango/opentype/harfbuzz-gdef-private.h
blob: e07e23641ae6b3af353f578d270d3e2c16065c6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*******************************************************************
 *
 *  Copyright 1996-2000 by
 *  David Turner, Robert Wilhelm, and Werner Lemberg.
 *
 *  Copyright 2006  Behdad Esfahbod
 *
 *  This is part of HarfBuzz, an OpenType Layout engine library.
 *
 *  See the file name COPYING for licensing information.
 *
 ******************************************************************/
#ifndef HARFBUZZ_GDEF_PRIVATE_H
#define HARFBUZZ_GDEF_PRIVATE_H

#include "harfbuzz-gdef.h"
#include "harfbuzz-buffer.h"

FT_BEGIN_HEADER


/* Attachment related structures */

struct  HB_AttachPoint_
{
  FT_UShort   PointCount;             /* size of the PointIndex array */
  FT_UShort*  PointIndex;             /* array of contour points      */
};

/* Ligature Caret related structures */

struct  HB_CaretValueFormat1_
{
  FT_Short  Coordinate;               /* x or y value (in design units) */
};

typedef struct HB_CaretValueFormat1_  HB_CaretValueFormat1;


struct  HB_CaretValueFormat2_
{
  FT_UShort  CaretValuePoint;         /* contour point index on glyph */
};

typedef struct HB_CaretValueFormat2_  HB_CaretValueFormat2;


struct  HB_CaretValueFormat3_
{
  FT_Short    Coordinate;             /* x or y value (in design units) */
  HB_Device  Device;                 /* Device table for x or y value  */
};

typedef struct HB_CaretValueFormat3_  HB_CaretValueFormat3;


struct  HB_CaretValueFormat4_
{
  FT_UShort  IdCaretValue;            /* metric ID */
};

typedef struct HB_CaretValueFormat4_  HB_CaretValueFormat4;


struct  HB_CaretValue_
{
  FT_UShort  CaretValueFormat;        /* 1, 2, 3, or 4 */

  union
  {
    HB_CaretValueFormat1  cvf1;
    HB_CaretValueFormat2  cvf2;
    HB_CaretValueFormat3  cvf3;
    HB_CaretValueFormat4  cvf4;
  } cvf;
};

typedef struct HB_CaretValue_  HB_CaretValue;


struct  HB_LigGlyph_
{
  FT_Bool          loaded;

  FT_UShort        CaretCount;        /* number of caret values */
  HB_CaretValue*  CaretValue;        /* array of caret values  */
};


FT_Error  _HB_GDEF_Add_Glyph_Property( HB_GDEFHeader*   gdef,
				       FT_UShort        glyphID,
				       FT_UShort        property );

FT_Error  _HB_GDEF_Check_Property( HB_GDEFHeader*   gdef,
				   HB_GlyphItem    item,
				   FT_UShort        flags,
				   FT_UShort*       property );

FT_END_HEADER

#endif /* HARFBUZZ_GDEF_PRIVATE_H */