]>
Commit | Line | Data |
---|---|---|
b75a7d8f | 1 | /* |
b75a7d8f | 2 | * |
374ca955 | 3 | * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved |
b75a7d8f A |
4 | * |
5 | */ | |
6 | ||
7 | #ifndef __LOOKUPS_H | |
8 | #define __LOOKUPS_H | |
9 | ||
10 | /** | |
11 | * \file | |
12 | * \internal | |
13 | */ | |
14 | ||
15 | #include "LETypes.h" | |
16 | #include "OpenTypeTables.h" | |
17 | ||
18 | U_NAMESPACE_BEGIN | |
19 | ||
20 | enum LookupFlags | |
21 | { | |
22 | lfBaselineIsLogicalEnd = 0x0001, // The MS spec. calls this flag "RightToLeft" but this name is more accurate | |
23 | lfIgnoreBaseGlyphs = 0x0002, | |
24 | lfIgnoreLigatures = 0x0004, | |
25 | lfIgnoreMarks = 0x0008, | |
26 | lfReservedMask = 0x00F0, | |
27 | lfMarkAttachTypeMask = 0xFF00, | |
28 | lfMarkAttachTypeShift = 8 | |
29 | }; | |
30 | ||
31 | struct LookupSubtable | |
32 | { | |
33 | le_uint16 subtableFormat; | |
34 | Offset coverageTableOffset; | |
35 | ||
36 | le_int32 getGlyphCoverage(LEGlyphID glyphID) const; | |
37 | le_int32 getGlyphCoverage(Offset tableOffset, LEGlyphID glyphID) const; | |
38 | }; | |
39 | ||
40 | struct LookupTable | |
41 | { | |
42 | le_uint16 lookupType; | |
43 | le_uint16 lookupFlags; | |
44 | le_uint16 subTableCount; | |
45 | Offset subTableOffsetArray[ANY_NUMBER]; | |
46 | ||
47 | const LookupSubtable *getLookupSubtable(le_uint16 subtableIndex) const; | |
48 | }; | |
49 | ||
50 | struct LookupListTable | |
51 | { | |
52 | le_uint16 lookupCount; | |
53 | Offset lookupTableOffsetArray[ANY_NUMBER]; | |
54 | ||
55 | const LookupTable *getLookupTable(le_uint16 lookupTableIndex) const; | |
56 | }; | |
57 | ||
58 | inline le_int32 LookupSubtable::getGlyphCoverage(LEGlyphID glyphID) const | |
59 | { | |
60 | return getGlyphCoverage(coverageTableOffset, glyphID); | |
61 | } | |
62 | ||
63 | U_NAMESPACE_END | |
64 | #endif |