]>
git.saurik.com Git - apple/icu.git/blob - icuSources/layout/MarkArrays.cpp
3 * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
8 #include "LEFontInstance.h"
9 #include "OpenTypeTables.h"
10 #include "AnchorTables.h"
11 #include "MarkArrays.h"
16 le_int32
MarkArray::getMarkClass(LEGlyphID glyphID
, le_int32 coverageIndex
, const LEFontInstance
*fontInstance
,
17 LEPoint
&anchor
) const
19 le_int32 markClass
= -1;
21 if (coverageIndex
>= 0) {
22 le_uint16 mCount
= SWAPW(markCount
);
24 if (coverageIndex
< mCount
) {
25 const MarkRecord
*markRecord
= &markRecordArray
[coverageIndex
];
26 Offset anchorTableOffset
= SWAPW(markRecord
->markAnchorTableOffset
);
27 const AnchorTable
*anchorTable
= (AnchorTable
*) ((char *) this + anchorTableOffset
);
29 anchorTable
->getAnchor(glyphID
, fontInstance
, anchor
);
30 markClass
= SWAPW(markRecord
->markClass
);
33 // XXXX If we get here, the table is mal-formed