3 * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
8 #include "OpenTypeTables.h"
10 #include "CoverageTables.h"
15 const LEReferenceTo
<LookupTable
> LookupListTable::getLookupTable(const LEReferenceTo
<LookupListTable
> &base
, le_uint16 lookupTableIndex
, LEErrorCode
&success
) const
17 LEReferenceToArrayOf
<Offset
> lookupTableOffsetArrayRef(base
, success
, (const Offset
*)&lookupTableOffsetArray
, SWAPW(lookupCount
));
19 if(LE_FAILURE(success
) || lookupTableIndex
>lookupTableOffsetArrayRef
.getCount()) {
20 return LEReferenceTo
<LookupTable
>();
22 return LEReferenceTo
<LookupTable
>(base
, success
, SWAPW(lookupTableOffsetArrayRef
.getObject(lookupTableIndex
, success
)));
26 const LEReferenceTo
<LookupSubtable
> LookupTable::getLookupSubtable(const LEReferenceTo
<LookupTable
> &base
, le_uint16 subtableIndex
, LEErrorCode
&success
) const
28 LEReferenceToArrayOf
<Offset
> subTableOffsetArrayRef(base
, success
, (const Offset
*)&subTableOffsetArray
, SWAPW(subTableCount
));
30 if(LE_FAILURE(success
) || subtableIndex
>subTableOffsetArrayRef
.getCount()) {
31 return LEReferenceTo
<LookupSubtable
>();
33 return LEReferenceTo
<LookupSubtable
>(base
, success
, SWAPW(subTableOffsetArrayRef
.getObject(subtableIndex
, success
)));
37 le_int32
LookupSubtable::getGlyphCoverage(const LEReferenceTo
<LookupSubtable
> &base
, Offset tableOffset
, LEGlyphID glyphID
, LEErrorCode
&success
) const
39 const LEReferenceTo
<CoverageTable
> coverageTable(base
, success
, SWAPW(tableOffset
));
41 if(LE_FAILURE(success
)) return 0;
43 return coverageTable
->getGlyphCoverage(glyphID
);