8067050: Better font consistency checking

Reviewed-by: bae, srl, mschoene
This commit is contained in:
Phil Race 2014-12-18 10:45:45 -08:00
parent 5299b605ee
commit c60792dc47
2 changed files with 3 additions and 3 deletions

View File

@ -150,8 +150,8 @@ public:
if(isEmpty()) {
//err = LE_MISSING_FONT_TABLE_ERROR;
clear(); // it's just empty. Not an error.
} else if(offset >= fParent->fLength) {
LE_DEBUG_TR3("offset out of range: (%p) +%d", NULL, offset);
} else if(offset >= fParent->fLength || (offset & 0x01)) {
LE_DEBUG_TR3("offset out of range or odd alignment: (%p) +%d", NULL, offset);
err = LE_INDEX_OUT_OF_BOUNDS_ERROR;
clear();
} else {

View File

@ -58,7 +58,7 @@ le_uint32 LigatureSubstitutionSubtable::process(const LETableReference &base, Gl
if( LE_FAILURE(success) ) { return 0; }
le_uint16 ligCount = SWAPW(ligSetTable->ligatureCount);
LEReferenceTo<Offset> ligatureTableOffsetArray(base, success, ligSetTable->ligatureTableOffsetArray, ligCount);
LEReferenceToArrayOf<Offset> ligatureTableOffsetArray(base, success, ligSetTable->ligatureTableOffsetArray, ligCount);
for (le_uint16 lig = 0; LE_SUCCESS(success) && lig < ligCount; lig += 1) {
Offset ligTableOffset = SWAPW(ligSetTable->ligatureTableOffsetArray[lig]);
LEReferenceTo<LigatureTable> ligTable(ligSetTable, success, ligTableOffset);