2000-11-28 20:56:52 +00:00
|
|
|
/*
|
|
|
|
* @(#)GlyphSubstitutionTables.cpp 1.9 00/03/15
|
|
|
|
*
|
2003-06-03 20:58:22 +00:00
|
|
|
* (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved
|
2000-11-28 20:56:52 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "LETypes.h"
|
|
|
|
#include "LEGlyphFilter.h"
|
|
|
|
#include "OpenTypeTables.h"
|
|
|
|
#include "Lookups.h"
|
|
|
|
#include "GlyphDefinitionTables.h"
|
|
|
|
#include "GlyphPositionAdjustments.h"
|
|
|
|
#include "GlyphSubstitutionTables.h"
|
2000-12-21 02:52:24 +00:00
|
|
|
#include "GlyphSubstLookupProc.h"
|
2000-11-28 20:56:52 +00:00
|
|
|
#include "ScriptAndLanguage.h"
|
|
|
|
#include "LESwaps.h"
|
|
|
|
|
2001-10-16 00:39:01 +00:00
|
|
|
U_NAMESPACE_BEGIN
|
|
|
|
|
2003-09-24 21:05:40 +00:00
|
|
|
le_int32 GlyphSubstitutionTableHeader::process(LEGlyphID *&glyphs, const LETag **&glyphTags, le_int32 *&charIndices, le_int32 glyphCount,
|
2000-11-28 20:56:52 +00:00
|
|
|
le_bool rightToLeft, LETag scriptTag, LETag languageTag,
|
2001-01-19 00:30:17 +00:00
|
|
|
const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
|
2002-03-01 22:24:10 +00:00
|
|
|
const LEGlyphFilter *filter, const LETag *featureOrder) const
|
2000-11-28 20:56:52 +00:00
|
|
|
{
|
2002-03-01 22:24:10 +00:00
|
|
|
GlyphSubstitutionLookupProcessor processor(this, scriptTag, languageTag, filter, featureOrder);
|
2000-11-28 20:56:52 +00:00
|
|
|
|
2003-09-24 21:05:40 +00:00
|
|
|
return processor.process(glyphs, NULL, glyphTags, charIndices, glyphCount, rightToLeft, glyphDefinitionTableHeader, NULL);
|
2000-11-28 20:56:52 +00:00
|
|
|
}
|
|
|
|
|
2001-01-19 00:30:17 +00:00
|
|
|
le_bool GlyphSubstitutionTableHeader::coversScript(LETag scriptTag) const
|
2000-11-28 20:56:52 +00:00
|
|
|
{
|
2001-01-19 00:30:17 +00:00
|
|
|
const ScriptListTable *scriptListTable = (const ScriptListTable *) ((char *)this + SWAPW(scriptListOffset));
|
2000-11-28 20:56:52 +00:00
|
|
|
|
|
|
|
return scriptListTable->findScript(scriptTag) != NULL;
|
|
|
|
}
|
|
|
|
|
2003-04-12 00:37:12 +00:00
|
|
|
le_bool GlyphSubstitutionTableHeader::coversScriptAndLanguage(LETag scriptTag, LETag languageTag) const
|
|
|
|
{
|
|
|
|
const ScriptListTable *scriptListTable = (const ScriptListTable *) ((char *)this + SWAPW(scriptListOffset));
|
|
|
|
|
|
|
|
return scriptListTable->findLanguage(scriptTag, languageTag, true) != NULL;
|
|
|
|
}
|
|
|
|
|
2001-10-16 00:39:01 +00:00
|
|
|
U_NAMESPACE_END
|