]> git.saurik.com Git - apple/icu.git/blame - icuSources/layout/PairPositioningSubtables.h
ICU-57166.0.1.tar.gz
[apple/icu.git] / icuSources / layout / PairPositioningSubtables.h
CommitLineData
b75a7d8f 1/*
b75a7d8f 2 *
57a6839d 3 * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
b75a7d8f
A
4 *
5 */
6
7#ifndef __PAIRPOSITIONINGSUBTABLES_H
8#define __PAIRPOSITIONINGSUBTABLES_H
9
10/**
11 * \file
12 * \internal
13 */
14
15#include "LETypes.h"
16#include "LEFontInstance.h"
17#include "OpenTypeTables.h"
18#include "GlyphPositioningTables.h"
19#include "ValueRecords.h"
20#include "GlyphIterator.h"
21
22U_NAMESPACE_BEGIN
23
24// NOTE: ValueRecord has a variable size
25struct PairValueRecord
26{
27 TTGlyphID secondGlyph;
28 ValueRecord valueRecord1;
29// ValueRecord valueRecord2;
30};
31
32struct PairSetTable
33{
34 le_uint16 pairValueCount;
35 PairValueRecord pairValueRecordArray[ANY_NUMBER];
36};
57a6839d 37LE_VAR_ARRAY(PairSetTable, pairValueRecordArray)
b75a7d8f
A
38
39struct PairPositioningSubtable : GlyphPositioningSubtable
40{
41 ValueFormat valueFormat1;
42 ValueFormat valueFormat2;
43
57a6839d 44 le_uint32 process(const LEReferenceTo<PairPositioningSubtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const;
b75a7d8f
A
45};
46
47struct PairPositioningFormat1Subtable : PairPositioningSubtable
48{
49 le_uint16 pairSetCount;
50 Offset pairSetTableOffsetArray[ANY_NUMBER];
51
57a6839d 52 le_uint32 process(const LEReferenceTo<PairPositioningFormat1Subtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const;
b75a7d8f
A
53
54private:
55 const PairValueRecord *findPairValueRecord(TTGlyphID glyphID, const PairValueRecord *records,
56 le_uint16 recordCount, le_uint16 recordSize) const;
57};
57a6839d 58LE_VAR_ARRAY(PairPositioningFormat1Subtable, pairSetTableOffsetArray)
b75a7d8f
A
59
60// NOTE: ValueRecord has a variable size
61struct Class2Record
62{
63 ValueRecord valueRecord1;
64// ValueRecord valurRecord2;
65};
66
67struct Class1Record
68{
69 Class2Record class2RecordArray[ANY_NUMBER];
70};
57a6839d 71LE_VAR_ARRAY(Class1Record, class2RecordArray)
b75a7d8f
A
72
73struct PairPositioningFormat2Subtable : PairPositioningSubtable
74{
75 Offset classDef1Offset;
76 Offset classDef2Offset;
77 le_uint16 class1Count;
78 le_uint16 class2Count;
79 Class1Record class1RecordArray[ANY_NUMBER];
80
57a6839d 81 le_uint32 process(const LEReferenceTo<PairPositioningFormat2Subtable> &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const;
b75a7d8f 82};
57a6839d 83LE_VAR_ARRAY(PairPositioningFormat2Subtable, class1RecordArray)
b75a7d8f
A
84
85U_NAMESPACE_END
86#endif
87
88