2000-11-28 20:56:52 +00:00
|
|
|
/*
|
|
|
|
*
|
2004-05-07 23:29:16 +00:00
|
|
|
* (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
|
2000-11-28 20:56:52 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "LETypes.h"
|
|
|
|
#include "OpenTypeTables.h"
|
|
|
|
#include "Lookups.h"
|
|
|
|
#include "CoverageTables.h"
|
|
|
|
#include "LESwaps.h"
|
|
|
|
|
2001-10-16 00:39:01 +00:00
|
|
|
U_NAMESPACE_BEGIN
|
|
|
|
|
2001-01-19 00:30:17 +00:00
|
|
|
const LookupTable *LookupListTable::getLookupTable(le_uint16 lookupTableIndex) const
|
2000-11-28 20:56:52 +00:00
|
|
|
{
|
|
|
|
if (lookupTableIndex >= SWAPW(lookupCount)) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
Offset lookupTableOffset = lookupTableOffsetArray[lookupTableIndex];
|
|
|
|
|
2001-01-19 00:30:17 +00:00
|
|
|
return (const LookupTable *) ((char *) this + SWAPW(lookupTableOffset));
|
2000-11-28 20:56:52 +00:00
|
|
|
}
|
|
|
|
|
2001-01-19 00:30:17 +00:00
|
|
|
const LookupSubtable *LookupTable::getLookupSubtable(le_uint16 subtableIndex) const
|
2000-11-28 20:56:52 +00:00
|
|
|
{
|
|
|
|
if (subtableIndex >= SWAPW(subTableCount)) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
Offset subtableOffset = subTableOffsetArray[subtableIndex];
|
|
|
|
|
2001-01-19 00:30:17 +00:00
|
|
|
return (const LookupSubtable *) ((char *) this + SWAPW(subtableOffset));
|
2000-11-28 20:56:52 +00:00
|
|
|
}
|
|
|
|
|
2001-01-19 00:30:17 +00:00
|
|
|
le_int32 LookupSubtable::getGlyphCoverage(Offset tableOffset, LEGlyphID glyphID) const
|
2000-11-28 20:56:52 +00:00
|
|
|
{
|
2001-01-19 00:30:17 +00:00
|
|
|
const CoverageTable *coverageTable = (const CoverageTable *) ((char *) this + SWAPW(tableOffset));
|
2000-11-28 20:56:52 +00:00
|
|
|
|
|
|
|
return coverageTable->getGlyphCoverage(glyphID);
|
|
|
|
}
|
|
|
|
|
2001-10-16 00:39:01 +00:00
|
|
|
U_NAMESPACE_END
|