]> git.saurik.com Git - apple/icu.git/blame - icuSources/layout/Lookups.h
ICU-511.25.tar.gz
[apple/icu.git] / icuSources / layout / Lookups.h
CommitLineData
b75a7d8f 1/*
b75a7d8f 2 *
73c04bcf 3 * (C) Copyright IBM Corp. 1998-2005 - 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
18U_NAMESPACE_BEGIN
19
20enum 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
31struct LookupSubtable
32{
33 le_uint16 subtableFormat;
34 Offset coverageTableOffset;
35
73c04bcf
A
36 inline le_int32 getGlyphCoverage(LEGlyphID glyphID) const;
37
b75a7d8f
A
38 le_int32 getGlyphCoverage(Offset tableOffset, LEGlyphID glyphID) const;
39};
40
41struct LookupTable
42{
43 le_uint16 lookupType;
44 le_uint16 lookupFlags;
45 le_uint16 subTableCount;
46 Offset subTableOffsetArray[ANY_NUMBER];
47
48 const LookupSubtable *getLookupSubtable(le_uint16 subtableIndex) const;
49};
50
51struct LookupListTable
52{
53 le_uint16 lookupCount;
54 Offset lookupTableOffsetArray[ANY_NUMBER];
55
56 const LookupTable *getLookupTable(le_uint16 lookupTableIndex) const;
57};
58
59inline le_int32 LookupSubtable::getGlyphCoverage(LEGlyphID glyphID) const
60{
61 return getGlyphCoverage(coverageTableOffset, glyphID);
62}
63
64U_NAMESPACE_END
65#endif