summaryrefslogtreecommitdiff
path: root/Build/source/libs/icu-xetex/layout/MultipleSubstSubtables.cpp
diff options
context:
space:
mode:
authorJonathan Kew <jfkthame@googlemail.com>2008-03-04 13:21:23 +0000
committerJonathan Kew <jfkthame@googlemail.com>2008-03-04 13:21:23 +0000
commitf483a5de9331a257f597282e611ecfb63f5ab118 (patch)
tree756baa5a727dd0438448eb380bb6ca81fb41d534 /Build/source/libs/icu-xetex/layout/MultipleSubstSubtables.cpp
parente2603863b071e717675b6a69e97c45a42e55bf2c (diff)
remove old icu version
git-svn-id: svn://tug.org/texlive/trunk@6841 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/icu-xetex/layout/MultipleSubstSubtables.cpp')
-rw-r--r--Build/source/libs/icu-xetex/layout/MultipleSubstSubtables.cpp87
1 files changed, 0 insertions, 87 deletions
diff --git a/Build/source/libs/icu-xetex/layout/MultipleSubstSubtables.cpp b/Build/source/libs/icu-xetex/layout/MultipleSubstSubtables.cpp
deleted file mode 100644
index 450bf35bc94..00000000000
--- a/Build/source/libs/icu-xetex/layout/MultipleSubstSubtables.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- *
- * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
- *
- */
-
-#include "LETypes.h"
-#include "LEGlyphFilter.h"
-#include "OpenTypeTables.h"
-#include "GlyphSubstitutionTables.h"
-#include "MultipleSubstSubtables.h"
-#include "GlyphIterator.h"
-#include "LESwaps.h"
-
-U_NAMESPACE_BEGIN
-
-le_uint32 MultipleSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const
-{
- LEGlyphID glyph = glyphIterator->getCurrGlyphID();
-
- // If there's a filter, we only want to do the
- // substitution if the *input* glyphs doesn't
- // exist.
- //
- // FIXME: is this always the right thing to do?
- // FIXME: should this only be done for a non-zero
- // glyphCount?
- if (filter != NULL && filter->accept(glyph)) {
- return 0;
- }
-
- le_int32 coverageIndex = getGlyphCoverage(glyph);
- le_uint16 seqCount = SWAPW(sequenceCount);
-
- if (coverageIndex >= 0 && coverageIndex < seqCount) {
- Offset sequenceTableOffset = SWAPW(sequenceTableOffsetArray[coverageIndex]);
- const SequenceTable *sequenceTable = (const SequenceTable *) ((char *) this + sequenceTableOffset);
- le_uint16 glyphCount = SWAPW(sequenceTable->glyphCount);
-
- if (glyphCount == 0) {
- glyphIterator->setCurrGlyphID(0xFFFF);
- return 1;
- } else if (glyphCount == 1) {
- TTGlyphID substitute = SWAPW(sequenceTable->substituteArray[0]);
-
- if (filter != NULL && ! filter->accept(LE_SET_GLYPH(glyph, substitute))) {
- return 0;
- }
-
- glyphIterator->setCurrGlyphID(substitute);
- return 1;
- } else {
- // If there's a filter, make sure all of the output glyphs
- // exist.
- if (filter != NULL) {
- for (le_int32 i = 0; i < glyphCount; i += 1) {
- TTGlyphID substitute = SWAPW(sequenceTable->substituteArray[i]);
-
- if (! filter->accept(substitute)) {
- return 0;
- }
- }
- }
-
- LEGlyphID *newGlyphs = glyphIterator->insertGlyphs(glyphCount);
- le_int32 insert = 0, direction = 1;
-
- if (glyphIterator->isRightToLeft()) {
- insert = glyphCount - 1;
- direction = -1;
- }
-
- for (le_int32 i = 0; i < glyphCount; i += 1) {
- TTGlyphID substitute = SWAPW(sequenceTable->substituteArray[i]);
-
- newGlyphs[insert] = LE_SET_GLYPH(glyph, substitute);
- insert += direction;
- }
-
- return 1;
- }
- }
-
- return 0;
-}
-
-U_NAMESPACE_END