1/* 2 * 3 * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved 4 * 5 */ 6 7#include "LETypes.h" 8#include "OpenTypeTables.h" 9#include "ScriptAndLanguage.h" 10#include "GlyphLookupTables.h" 11#include "LESwaps.h" 12 13U_NAMESPACE_BEGIN 14 15le_bool GlyphLookupTableHeader::coversScript(const LETableReference &base, LETag scriptTag, LEErrorCode &success) const 16{ 17 LEReferenceTo<ScriptListTable> scriptListTable(base, success, SWAPW(scriptListOffset)); 18 19 return (scriptListOffset != 0) && scriptListTable->findScript(scriptListTable, scriptTag, success) .isValid(); 20} 21 22le_bool GlyphLookupTableHeader::coversScriptAndLanguage(const LETableReference &base, LETag scriptTag, LETag languageTag, LEErrorCode &success, le_bool exactMatch) const 23{ 24 LEReferenceTo<ScriptListTable> scriptListTable(base, success, SWAPW(scriptListOffset)); 25 LEReferenceTo<LangSysTable> langSysTable = scriptListTable->findLanguage(scriptListTable, 26 scriptTag, languageTag, success, exactMatch); 27 28 // FIXME: could check featureListOffset, lookupListOffset, and lookup count... 29 // Note: don't have to SWAPW langSysTable->featureCount to check for non-zero. 30 return LE_SUCCESS(success)&&langSysTable.isValid() && langSysTable->featureCount != 0; 31} 32 33U_NAMESPACE_END 34