diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-04-20 18:13:48 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-04-20 18:13:48 +0000 |
commit | e5786f530f9555469c01435f86039b06aa53feba (patch) | |
tree | c868e8d32282422d7d445b729db95c3fcdafb6d0 /Build/source/libs/icu/icu-xetex/layout/MarkArrays.cpp | |
parent | ebaa1768b43c8606d923d2e861b5286b74207b3e (diff) |
new build system: build icu libs and xetex plus misc updates
git-svn-id: svn://tug.org/texlive/trunk@12759 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/icu/icu-xetex/layout/MarkArrays.cpp')
-rw-r--r-- | Build/source/libs/icu/icu-xetex/layout/MarkArrays.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Build/source/libs/icu/icu-xetex/layout/MarkArrays.cpp b/Build/source/libs/icu/icu-xetex/layout/MarkArrays.cpp new file mode 100644 index 00000000000..47a06251e6d --- /dev/null +++ b/Build/source/libs/icu/icu-xetex/layout/MarkArrays.cpp @@ -0,0 +1,39 @@ +/* + * + * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved + * + */ + +#include "LETypes.h" +#include "LEFontInstance.h" +#include "OpenTypeTables.h" +#include "AnchorTables.h" +#include "MarkArrays.h" +#include "LESwaps.h" + +U_NAMESPACE_BEGIN + +le_int32 MarkArray::getMarkClass(LEGlyphID glyphID, le_int32 coverageIndex, const LEFontInstance *fontInstance, + LEPoint &anchor) const +{ + le_int32 markClass = -1; + + if (coverageIndex >= 0) { + le_uint16 mCount = SWAPW(markCount); + + if (coverageIndex < mCount) { + const MarkRecord *markRecord = &markRecordArray[coverageIndex]; + Offset anchorTableOffset = SWAPW(markRecord->markAnchorTableOffset); + const AnchorTable *anchorTable = (AnchorTable *) ((char *) this + anchorTableOffset); + + anchorTable->getAnchor(glyphID, fontInstance, anchor); + markClass = SWAPW(markRecord->markClass); + } + + // XXXX If we get here, the table is mal-formed + } + + return markClass; +} + +U_NAMESPACE_END |