• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_GPOS_PRIVATE_H
27 #define HARFBUZZ_GPOS_PRIVATE_H
28 
29 #include "harfbuzz-impl.h"
30 #include "harfbuzz-stream-private.h"
31 #include "harfbuzz-gpos.h"
32 
33 HB_BEGIN_HEADER
34 
35 
36 /* shared tables */
37 
38 struct  HB_ValueRecord_
39 {
40   HB_Short    XPlacement;             /* horizontal adjustment for
41 					 placement                      */
42   HB_Short    YPlacement;             /* vertical adjustment for
43 					 placement                      */
44   HB_Short    XAdvance;               /* horizontal adjustment for
45 					 advance                        */
46   HB_Short    YAdvance;               /* vertical adjustment for
47 					 advance                        */
48   HB_Device  XPlacementDevice;       /* device table for horizontal
49 					 placement                      */
50   HB_Device  YPlacementDevice;       /* device table for vertical
51 					 placement                      */
52   HB_Device  XAdvanceDevice;         /* device table for horizontal
53 					 advance                        */
54   HB_Device  YAdvanceDevice;         /* device table for vertical
55 					 advance                        */
56   HB_UShort   XIdPlacement;           /* horizontal placement metric ID */
57   HB_UShort   YIdPlacement;           /* vertical placement metric ID   */
58   HB_UShort   XIdAdvance;             /* horizontal advance metric ID   */
59   HB_UShort   YIdAdvance;             /* vertical advance metric ID     */
60 };
61 
62 typedef struct HB_ValueRecord_  HB_ValueRecord;
63 
64 
65 /* Mask values to scan the value format of the ValueRecord structure.
66  We always expand compressed ValueRecords of the font.              */
67 
68 #define HB_GPOS_FORMAT_HAVE_X_PLACEMENT         0x0001
69 #define HB_GPOS_FORMAT_HAVE_Y_PLACEMENT         0x0002
70 #define HB_GPOS_FORMAT_HAVE_X_ADVANCE           0x0004
71 #define HB_GPOS_FORMAT_HAVE_Y_ADVANCE           0x0008
72 #define HB_GPOS_FORMAT_HAVE_X_PLACEMENT_DEVICE  0x0010
73 #define HB_GPOS_FORMAT_HAVE_Y_PLACEMENT_DEVICE  0x0020
74 #define HB_GPOS_FORMAT_HAVE_X_ADVANCE_DEVICE    0x0040
75 #define HB_GPOS_FORMAT_HAVE_Y_ADVANCE_DEVICE    0x0080
76 #define HB_GPOS_FORMAT_HAVE_X_ID_PLACEMENT      0x0100
77 #define HB_GPOS_FORMAT_HAVE_Y_ID_PLACEMENT      0x0200
78 #define HB_GPOS_FORMAT_HAVE_X_ID_ADVANCE        0x0400
79 #define HB_GPOS_FORMAT_HAVE_Y_ID_ADVANCE        0x0800
80 
81 
82 struct  HB_AnchorFormat1_
83 {
84   HB_Short   XCoordinate;             /* horizontal value */
85   HB_Short   YCoordinate;             /* vertical value   */
86 };
87 
88 typedef struct HB_AnchorFormat1_  HB_AnchorFormat1;
89 
90 
91 struct  HB_AnchorFormat2_
92 {
93   HB_Short   XCoordinate;             /* horizontal value             */
94   HB_Short   YCoordinate;             /* vertical value               */
95   HB_UShort  AnchorPoint;             /* index to glyph contour point */
96 };
97 
98 typedef struct HB_AnchorFormat2_  HB_AnchorFormat2;
99 
100 
101 struct  HB_AnchorFormat3_
102 {
103   HB_Short    XCoordinate;            /* horizontal value              */
104   HB_Short    YCoordinate;            /* vertical value                */
105   HB_Device  XDeviceTable;           /* device table for X coordinate */
106   HB_Device  YDeviceTable;           /* device table for Y coordinate */
107 };
108 
109 typedef struct HB_AnchorFormat3_  HB_AnchorFormat3;
110 
111 
112 struct  HB_AnchorFormat4_
113 {
114   HB_UShort  XIdAnchor;               /* horizontal metric ID */
115   HB_UShort  YIdAnchor;               /* vertical metric ID   */
116 };
117 
118 typedef struct HB_AnchorFormat4_  HB_AnchorFormat4;
119 
120 
121 struct  HB_Anchor_
122 {
123   HB_UShort  PosFormat;               /* 1, 2, 3, or 4 -- 0 indicates
124 					 that there is no Anchor table */
125 
126   union
127   {
128     HB_AnchorFormat1  af1;
129     HB_AnchorFormat2  af2;
130     HB_AnchorFormat3  af3;
131     HB_AnchorFormat4  af4;
132   } af;
133 };
134 
135 typedef struct HB_Anchor_  HB_Anchor;
136 
137 
138 struct  HB_MarkRecord_
139 {
140   HB_UShort   Class;                  /* mark class   */
141   HB_Anchor  MarkAnchor;             /* anchor table */
142 };
143 
144 typedef struct HB_MarkRecord_  HB_MarkRecord;
145 
146 
147 struct  HB_MarkArray_
148 {
149   HB_UShort        MarkCount;         /* number of MarkRecord tables */
150   HB_MarkRecord*  MarkRecord;        /* array of MarkRecord tables  */
151 };
152 
153 typedef struct HB_MarkArray_  HB_MarkArray;
154 
155 
156 /* LookupType 1 */
157 
158 struct  HB_SinglePosFormat1_
159 {
160   HB_ValueRecord  Value;             /* ValueRecord for all covered
161 					 glyphs                      */
162 };
163 
164 typedef struct HB_SinglePosFormat1_  HB_SinglePosFormat1;
165 
166 
167 struct  HB_SinglePosFormat2_
168 {
169   HB_UShort         ValueCount;       /* number of ValueRecord tables */
170   HB_ValueRecord*  Value;            /* array of ValueRecord tables  */
171 };
172 
173 typedef struct HB_SinglePosFormat2_  HB_SinglePosFormat2;
174 
175 
176 struct  HB_SinglePos_
177 {
178   HB_UShort     PosFormat;            /* 1 or 2         */
179   HB_Coverage  Coverage;             /* Coverage table */
180 
181   HB_UShort     ValueFormat;          /* format of ValueRecord table */
182 
183   union
184   {
185     HB_SinglePosFormat1  spf1;
186     HB_SinglePosFormat2  spf2;
187   } spf;
188 };
189 
190 typedef struct HB_SinglePos_  HB_SinglePos;
191 
192 
193 /* LookupType 2 */
194 
195 struct  HB_PairValueRecord_
196 {
197   HB_UShort        SecondGlyph;       /* glyph ID for second glyph  */
198   HB_ValueRecord  Value1;            /* pos. data for first glyph  */
199   HB_ValueRecord  Value2;            /* pos. data for second glyph */
200 };
201 
202 typedef struct HB_PairValueRecord_  HB_PairValueRecord;
203 
204 
205 struct  HB_PairSet_
206 {
207   HB_UShort             PairValueCount;
208 				      /* number of PairValueRecord tables */
209   HB_PairValueRecord*  PairValueRecord;
210 				      /* array of PairValueRecord tables  */
211 };
212 
213 typedef struct HB_PairSet_  HB_PairSet;
214 
215 
216 struct  HB_PairPosFormat1_
217 {
218   HB_UShort     PairSetCount;         /* number of PairSet tables    */
219   HB_PairSet*  PairSet;              /* array of PairSet tables     */
220 };
221 
222 typedef struct HB_PairPosFormat1_  HB_PairPosFormat1;
223 
224 
225 struct  HB_Class2Record_
226 {
227   HB_ValueRecord  Value1;            /* pos. data for first glyph  */
228   HB_ValueRecord  Value2;            /* pos. data for second glyph */
229 };
230 
231 typedef struct HB_Class2Record_  HB_Class2Record;
232 
233 
234 struct  HB_Class1Record_
235 {
236   HB_Class2Record*  Class2Record;    /* array of Class2Record tables */
237 };
238 
239 typedef struct HB_Class1Record_  HB_Class1Record;
240 
241 
242 struct  HB_PairPosFormat2_
243 {
244   HB_ClassDefinition  ClassDef1;     /* class def. for first glyph     */
245   HB_ClassDefinition  ClassDef2;     /* class def. for second glyph    */
246   HB_UShort            Class1Count;   /* number of classes in ClassDef1
247 					 table                          */
248   HB_UShort            Class2Count;   /* number of classes in ClassDef2
249 					 table                          */
250   HB_Class1Record*    Class1Record;  /* array of Class1Record tables   */
251 };
252 
253 typedef struct HB_PairPosFormat2_  HB_PairPosFormat2;
254 
255 
256 struct  HB_PairPos_
257 {
258   HB_UShort     PosFormat;            /* 1 or 2         */
259   HB_Coverage  Coverage;             /* Coverage table */
260   HB_UShort     ValueFormat1;         /* format of ValueRecord table
261 					 for first glyph             */
262   HB_UShort     ValueFormat2;         /* format of ValueRecord table
263 					 for second glyph            */
264 
265   union
266   {
267     HB_PairPosFormat1  ppf1;
268     HB_PairPosFormat2  ppf2;
269   } ppf;
270 };
271 
272 typedef struct HB_PairPos_  HB_PairPos;
273 
274 
275 /* LookupType 3 */
276 
277 struct  HB_EntryExitRecord_
278 {
279   HB_Anchor  EntryAnchor;            /* entry Anchor table */
280   HB_Anchor  ExitAnchor;             /* exit Anchor table  */
281 };
282 
283 
284 typedef struct HB_EntryExitRecord_  HB_EntryExitRecord;
285 
286 struct  HB_CursivePos_
287 {
288   HB_UShort             PosFormat;    /* always 1                         */
289   HB_Coverage          Coverage;     /* Coverage table                   */
290   HB_UShort             EntryExitCount;
291 				      /* number of EntryExitRecord tables */
292   HB_EntryExitRecord*  EntryExitRecord;
293 				      /* array of EntryExitRecord tables  */
294 };
295 
296 typedef struct HB_CursivePos_  HB_CursivePos;
297 
298 
299 /* LookupType 4 */
300 
301 struct  HB_BaseRecord_
302 {
303   HB_Anchor*  BaseAnchor;            /* array of base glyph anchor
304 					 tables                     */
305 };
306 
307 typedef struct HB_BaseRecord_  HB_BaseRecord;
308 
309 
310 struct  HB_BaseArray_
311 {
312   HB_UShort        BaseCount;         /* number of BaseRecord tables */
313   HB_BaseRecord*  BaseRecord;        /* array of BaseRecord tables  */
314 };
315 
316 typedef struct HB_BaseArray_  HB_BaseArray;
317 
318 
319 struct  HB_MarkBasePos_
320 {
321   HB_UShort      PosFormat;           /* always 1                  */
322   HB_Coverage   MarkCoverage;        /* mark glyph coverage table */
323   HB_Coverage   BaseCoverage;        /* base glyph coverage table */
324   HB_UShort      ClassCount;          /* number of mark classes    */
325   HB_MarkArray  MarkArray;           /* mark array table          */
326   HB_BaseArray  BaseArray;           /* base array table          */
327 };
328 
329 typedef struct HB_MarkBasePos_  HB_MarkBasePos;
330 
331 
332 /* LookupType 5 */
333 
334 struct  HB_ComponentRecord_
335 {
336   HB_Anchor*  LigatureAnchor;        /* array of ligature glyph anchor
337 					 tables                         */
338 };
339 
340 typedef struct HB_ComponentRecord_  HB_ComponentRecord;
341 
342 
343 struct  HB_LigatureAttach_
344 {
345   HB_UShort             ComponentCount;
346 				      /* number of ComponentRecord tables */
347   HB_ComponentRecord*  ComponentRecord;
348 				      /* array of ComponentRecord tables  */
349 };
350 
351 typedef struct HB_LigatureAttach_  HB_LigatureAttach;
352 
353 
354 struct  HB_LigatureArray_
355 {
356   HB_UShort            LigatureCount; /* number of LigatureAttach tables */
357   HB_LigatureAttach*  LigatureAttach;
358 				      /* array of LigatureAttach tables  */
359 };
360 
361 typedef struct HB_LigatureArray_  HB_LigatureArray;
362 
363 
364 struct  HB_MarkLigPos_
365 {
366   HB_UShort          PosFormat;       /* always 1                      */
367   HB_Coverage       MarkCoverage;    /* mark glyph coverage table     */
368   HB_Coverage       LigatureCoverage;
369 				      /* ligature glyph coverage table */
370   HB_UShort          ClassCount;      /* number of mark classes        */
371   HB_MarkArray      MarkArray;       /* mark array table              */
372   HB_LigatureArray  LigatureArray;   /* ligature array table          */
373 };
374 
375 typedef struct HB_MarkLigPos_  HB_MarkLigPos;
376 
377 
378 /* LookupType 6 */
379 
380 struct  HB_Mark2Record_
381 {
382   HB_Anchor*  Mark2Anchor;           /* array of mark glyph anchor
383 					 tables                     */
384 };
385 
386 typedef struct HB_Mark2Record_  HB_Mark2Record;
387 
388 
389 struct  HB_Mark2Array_
390 {
391   HB_UShort         Mark2Count;       /* number of Mark2Record tables */
392   HB_Mark2Record*  Mark2Record;      /* array of Mark2Record tables  */
393 };
394 
395 typedef struct HB_Mark2Array_  HB_Mark2Array;
396 
397 
398 struct  HB_MarkMarkPos_
399 {
400   HB_UShort       PosFormat;          /* always 1                         */
401   HB_Coverage    Mark1Coverage;      /* first mark glyph coverage table  */
402   HB_Coverage    Mark2Coverage;      /* second mark glyph coverave table */
403   HB_UShort       ClassCount;         /* number of combining mark classes */
404   HB_MarkArray   Mark1Array;         /* MarkArray table for first mark   */
405   HB_Mark2Array  Mark2Array;         /* MarkArray table for second mark  */
406 };
407 
408 typedef struct HB_MarkMarkPos_  HB_MarkMarkPos;
409 
410 
411 /* needed by both lookup type 7 and 8 */
412 
413 struct  HB_PosLookupRecord_
414 {
415   HB_UShort  SequenceIndex;           /* index into current
416 					 glyph sequence               */
417   HB_UShort  LookupListIndex;         /* Lookup to apply to that pos. */
418 };
419 
420 typedef struct HB_PosLookupRecord_  HB_PosLookupRecord;
421 
422 
423 /* LookupType 7 */
424 
425 struct  HB_PosRule_
426 {
427   HB_UShort             GlyphCount;   /* total number of input glyphs     */
428   HB_UShort             PosCount;     /* number of PosLookupRecord tables */
429   HB_UShort*            Input;        /* array of input glyph IDs         */
430   HB_PosLookupRecord*  PosLookupRecord;
431 				      /* array of PosLookupRecord tables  */
432 };
433 
434 typedef struct HB_PosRule_  HB_PosRule;
435 
436 
437 struct  HB_PosRuleSet_
438 {
439   HB_UShort     PosRuleCount;         /* number of PosRule tables */
440   HB_PosRule*  PosRule;              /* array of PosRule tables  */
441 };
442 
443 typedef struct HB_PosRuleSet_  HB_PosRuleSet;
444 
445 
446 struct  HB_ContextPosFormat1_
447 {
448   HB_Coverage     Coverage;          /* Coverage table              */
449   HB_UShort        PosRuleSetCount;   /* number of PosRuleSet tables */
450   HB_PosRuleSet*  PosRuleSet;        /* array of PosRuleSet tables  */
451 };
452 
453 typedef struct HB_ContextPosFormat1_  HB_ContextPosFormat1;
454 
455 
456 struct  HB_PosClassRule_
457 {
458   HB_UShort             GlyphCount;   /* total number of context classes  */
459   HB_UShort             PosCount;     /* number of PosLookupRecord tables */
460   HB_UShort*            Class;        /* array of classes                 */
461   HB_PosLookupRecord*  PosLookupRecord;
462 				      /* array of PosLookupRecord tables  */
463 };
464 
465 typedef struct HB_PosClassRule_  HB_PosClassRule;
466 
467 
468 struct  HB_PosClassSet_
469 {
470   HB_UShort          PosClassRuleCount;
471 				      /* number of PosClassRule tables */
472   HB_PosClassRule*  PosClassRule;    /* array of PosClassRule tables  */
473 };
474 
475 typedef struct HB_PosClassSet_  HB_PosClassSet;
476 
477 
478 /* The `MaxContextLength' field is not defined in the TTO specification
479    but simplifies the implementation of this format.  It holds the
480    maximal context length used in the context rules.                    */
481 
482 struct  HB_ContextPosFormat2_
483 {
484   HB_UShort            MaxContextLength;
485 				      /* maximal context length       */
486   HB_Coverage         Coverage;      /* Coverage table               */
487   HB_ClassDefinition  ClassDef;      /* ClassDef table               */
488   HB_UShort            PosClassSetCount;
489 				      /* number of PosClassSet tables */
490   HB_PosClassSet*     PosClassSet;   /* array of PosClassSet tables  */
491 };
492 
493 typedef struct HB_ContextPosFormat2_  HB_ContextPosFormat2;
494 
495 
496 struct  HB_ContextPosFormat3_
497 {
498   HB_UShort             GlyphCount;   /* number of input glyphs           */
499   HB_UShort             PosCount;     /* number of PosLookupRecord tables */
500   HB_Coverage*         Coverage;     /* array of Coverage tables         */
501   HB_PosLookupRecord*  PosLookupRecord;
502 				      /* array of PosLookupRecord tables  */
503 };
504 
505 typedef struct HB_ContextPosFormat3_  HB_ContextPosFormat3;
506 
507 
508 struct  HB_ContextPos_
509 {
510   HB_UShort  PosFormat;               /* 1, 2, or 3     */
511 
512   union
513   {
514     HB_ContextPosFormat1  cpf1;
515     HB_ContextPosFormat2  cpf2;
516     HB_ContextPosFormat3  cpf3;
517   } cpf;
518 };
519 
520 typedef struct HB_ContextPos_  HB_ContextPos;
521 
522 
523 /* LookupType 8 */
524 
525 struct  HB_ChainPosRule_
526 {
527   HB_UShort             BacktrackGlyphCount;
528 				      /* total number of backtrack glyphs */
529   HB_UShort*            Backtrack;    /* array of backtrack glyph IDs     */
530   HB_UShort             InputGlyphCount;
531 				      /* total number of input glyphs     */
532   HB_UShort*            Input;        /* array of input glyph IDs         */
533   HB_UShort             LookaheadGlyphCount;
534 				      /* total number of lookahead glyphs */
535   HB_UShort*            Lookahead;    /* array of lookahead glyph IDs     */
536   HB_UShort             PosCount;     /* number of PosLookupRecords       */
537   HB_PosLookupRecord*  PosLookupRecord;
538 				      /* array of PosLookupRecords       */
539 };
540 
541 typedef struct HB_ChainPosRule_  HB_ChainPosRule;
542 
543 
544 struct  HB_ChainPosRuleSet_
545 {
546   HB_UShort          ChainPosRuleCount;
547 				      /* number of ChainPosRule tables */
548   HB_ChainPosRule*  ChainPosRule;    /* array of ChainPosRule tables  */
549 };
550 
551 typedef struct HB_ChainPosRuleSet_  HB_ChainPosRuleSet;
552 
553 
554 struct  HB_ChainContextPosFormat1_
555 {
556   HB_Coverage          Coverage;     /* Coverage table                   */
557   HB_UShort             ChainPosRuleSetCount;
558 				      /* number of ChainPosRuleSet tables */
559   HB_ChainPosRuleSet*  ChainPosRuleSet;
560 				      /* array of ChainPosRuleSet tables  */
561 };
562 
563 typedef struct HB_ChainContextPosFormat1_  HB_ChainContextPosFormat1;
564 
565 
566 struct  HB_ChainPosClassRule_
567 {
568   HB_UShort             BacktrackGlyphCount;
569 				      /* total number of backtrack
570 					 classes                         */
571   HB_UShort*            Backtrack;    /* array of backtrack classes      */
572   HB_UShort             InputGlyphCount;
573 				      /* total number of context classes */
574   HB_UShort*            Input;        /* array of context classes        */
575   HB_UShort             LookaheadGlyphCount;
576 				      /* total number of lookahead
577 					 classes                         */
578   HB_UShort*            Lookahead;    /* array of lookahead classes      */
579   HB_UShort             PosCount;     /* number of PosLookupRecords      */
580   HB_PosLookupRecord*  PosLookupRecord;
581 				      /* array of substitution lookups   */
582 };
583 
584 typedef struct HB_ChainPosClassRule_  HB_ChainPosClassRule;
585 
586 
587 struct  HB_ChainPosClassSet_
588 {
589   HB_UShort               ChainPosClassRuleCount;
590 				      /* number of ChainPosClassRule
591 					 tables                      */
592   HB_ChainPosClassRule*  ChainPosClassRule;
593 				      /* array of ChainPosClassRule
594 					 tables                      */
595 };
596 
597 typedef struct HB_ChainPosClassSet_  HB_ChainPosClassSet;
598 
599 
600 /* The `MaxXXXLength' fields are not defined in the TTO specification
601    but simplifies the implementation of this format.  It holds the
602    maximal context length used in the specific context rules.         */
603 
604 struct  HB_ChainContextPosFormat2_
605 {
606   HB_Coverage           Coverage;    /* Coverage table             */
607 
608   HB_UShort              MaxBacktrackLength;
609 				      /* maximal backtrack length   */
610   HB_ClassDefinition    BacktrackClassDef;
611 				      /* BacktrackClassDef table    */
612   HB_UShort              MaxInputLength;
613 				      /* maximal input length       */
614   HB_ClassDefinition    InputClassDef;
615 				      /* InputClassDef table        */
616   HB_UShort              MaxLookaheadLength;
617 				      /* maximal lookahead length   */
618   HB_ClassDefinition    LookaheadClassDef;
619 				      /* LookaheadClassDef table    */
620 
621   HB_UShort              ChainPosClassSetCount;
622 				      /* number of ChainPosClassSet
623 					 tables                     */
624   HB_ChainPosClassSet*  ChainPosClassSet;
625 				      /* array of ChainPosClassSet
626 					 tables                     */
627 };
628 
629 typedef struct HB_ChainContextPosFormat2_  HB_ChainContextPosFormat2;
630 
631 
632 struct  HB_ChainContextPosFormat3_
633 {
634   HB_UShort             BacktrackGlyphCount;
635 				      /* number of backtrack glyphs    */
636   HB_Coverage*         BacktrackCoverage;
637 				      /* array of backtrack Coverage
638 					 tables                        */
639   HB_UShort             InputGlyphCount;
640 				      /* number of input glyphs        */
641   HB_Coverage*         InputCoverage;
642 				      /* array of input coverage
643 					 tables                        */
644   HB_UShort             LookaheadGlyphCount;
645 				      /* number of lookahead glyphs    */
646   HB_Coverage*         LookaheadCoverage;
647 				      /* array of lookahead coverage
648 					 tables                        */
649   HB_UShort             PosCount;     /* number of PosLookupRecords    */
650   HB_PosLookupRecord*  PosLookupRecord;
651 				      /* array of substitution lookups */
652 };
653 
654 typedef struct HB_ChainContextPosFormat3_  HB_ChainContextPosFormat3;
655 
656 
657 struct  HB_ChainContextPos_
658 {
659   HB_UShort  PosFormat;             /* 1, 2, or 3 */
660 
661   union
662   {
663     HB_ChainContextPosFormat1  ccpf1;
664     HB_ChainContextPosFormat2  ccpf2;
665     HB_ChainContextPosFormat3  ccpf3;
666   } ccpf;
667 };
668 
669 typedef struct HB_ChainContextPos_  HB_ChainContextPos;
670 
671 
672 #if 0
673 /* LookupType 10 */
674 struct HB_ExtensionPos_
675 {
676   HB_UShort      PosFormat;           /* always 1 */
677   HB_UShort      LookuptType;         /* lookup-type of referenced subtable */
678   HB_GPOS_SubTable *subtable;         /* referenced subtable */
679 };
680 
681 typedef struct HB_ExtensionPos_  HB_ExtensionPos;
682 #endif
683 
684 
685 union  HB_GPOS_SubTable_
686 {
687   HB_SinglePos        single;
688   HB_PairPos          pair;
689   HB_CursivePos       cursive;
690   HB_MarkBasePos      markbase;
691   HB_MarkLigPos       marklig;
692   HB_MarkMarkPos      markmark;
693   HB_ContextPos       context;
694   HB_ChainContextPos  chain;
695 };
696 
697 typedef union HB_GPOS_SubTable_  HB_GPOS_SubTable;
698 
699 
700 
701 HB_INTERNAL HB_Error
702 _HB_GPOS_Load_SubTable( HB_GPOS_SubTable* st,
703 				  HB_Stream     stream,
704 				  HB_UShort     lookup_type );
705 
706 HB_INTERNAL void
707 _HB_GPOS_Free_SubTable( HB_GPOS_SubTable* st,
708 			      HB_UShort     lookup_type );
709 
710 HB_END_HEADER
711 
712 #endif /* HARFBUZZ_GPOS_PRIVATE_H */
713