sl@0: /* sl@0: * sl@0: * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved sl@0: * sl@0: */ sl@0: sl@0: #include "LETypes.h" sl@0: #include "LEFontInstance.h" sl@0: #include "OpenTypeTables.h" sl@0: #include "AnchorTables.h" sl@0: #include "MarkArrays.h" sl@0: #include "LESwaps.h" sl@0: sl@0: U_NAMESPACE_BEGIN sl@0: sl@0: le_int32 MarkArray::getMarkClass(LEGlyphID glyphID, le_int32 coverageIndex, const LEFontInstance *fontInstance, sl@0: LEPoint &anchor) const sl@0: { sl@0: le_int32 markClass = -1; sl@0: sl@0: if (coverageIndex >= 0) { sl@0: le_uint16 mCount = SWAPW(markCount); sl@0: sl@0: if (coverageIndex < mCount) { sl@0: const MarkRecord *markRecord = &markRecordArray[coverageIndex]; sl@0: Offset anchorTableOffset = SWAPW(markRecord->markAnchorTableOffset); sl@0: const AnchorTable *anchorTable = (AnchorTable *) ((char *) this + anchorTableOffset); sl@0: sl@0: anchorTable->getAnchor(glyphID, fontInstance, anchor); sl@0: markClass = SWAPW(markRecord->markClass); sl@0: } sl@0: sl@0: // XXXX If we get here, the table is mal-formed sl@0: } sl@0: sl@0: return markClass; sl@0: } sl@0: sl@0: U_NAMESPACE_END