ICU-2051 remove or comment FIXME and #if 0

X-SVN-Rev: 11725
This commit is contained in:
Eric Mader 2003-04-29 00:15:07 +00:00
parent 7f79b235fc
commit a2d46bd46a
6 changed files with 21 additions and 64 deletions

View File

@ -64,18 +64,6 @@ ArabicShaping::ShapeType ArabicShaping::getShapeType(LEUnicode c)
return ST_NOSHAPE_NONE;
}
#if 0
const LETag GlyphShaper::isolFeatureTag = LE_MAKE_TAG('i', 's', 'o', 'l');
const LETag GlyphShaper::initFeatureTag = LE_MAKE_TAG('i', 'n', 'i', 't');
const LETag GlyphShaper::mediFeatureTag = LE_MAKE_TAG('m', 'e', 'd', 'i');
const LETag GlyphShaper::finaFeatureTag = LE_MAKE_TAG('f', 'i', 'n', 'a');
const LETag GlyphShaper::ligaFeatureTag = LE_MAKE_TAG('l', 'i', 'g', 'a');
const LETag GlyphShaper::msetFeatureTag = LE_MAKE_TAG('m', 's', 'e', 't');
const LETag GlyphShaper::markFeatureTag = LE_MAKE_TAG('m', 'a', 'r', 'k');
const LETag GlyphShaper::emptyTag = 0x00000000; // ''
#else
const LETag isolFeatureTag = LE_MAKE_TAG('i', 's', 'o', 'l');
const LETag initFeatureTag = LE_MAKE_TAG('i', 'n', 'i', 't');
const LETag mediFeatureTag = LE_MAKE_TAG('m', 'e', 'd', 'i');
@ -83,10 +71,6 @@ const LETag finaFeatureTag = LE_MAKE_TAG('f', 'i', 'n', 'a');
const LETag ligaFeatureTag = LE_MAKE_TAG('l', 'i', 'g', 'a');
const LETag msetFeatureTag = LE_MAKE_TAG('m', 's', 'e', 't');
const LETag markFeatureTag = LE_MAKE_TAG('m', 'a', 'r', 'k');
const LETag emptyTag = 0x00000000; // ''
#endif
const LETag ccmpFeatureTag = LE_MAKE_TAG('c', 'c', 'm', 'p');
const LETag rligFeatureTag = LE_MAKE_TAG('r', 'l', 'i', 'g');
const LETag caltFeatureTag = LE_MAKE_TAG('c', 'a', 'l', 't');
@ -96,6 +80,7 @@ const LETag cursFeatureTag = LE_MAKE_TAG('c', 'u', 'r', 's');
const LETag kernFeatureTag = LE_MAKE_TAG('k', 'e', 'r', 'n');
const LETag mkmkFeatureTag = LE_MAKE_TAG('m', 'k', 'm', 'k');
const LETag emptyTag = 0x00000000; // ''
const LETag featureOrder[] =
{

View File

@ -80,18 +80,6 @@ public:
private:
const LETag **charTags;
#if 0
static const LETag isolFeatureTag; // 'isol'
static const LETag initFeatureTag; // 'init'
static const LETag mediFeatureTag; // 'medi'
static const LETag finaFeatureTag; // 'fina'
static const LETag ligaFeatureTag; // 'liga'
static const LETag msetFeatureTag; // 'mset'
static const LETag markFeatureTag; // 'mark'
static const LETag emptyTag;
#endif
static const LETag tagArray[];
GlyphShaper(const GlyphShaper &other); // forbid copying of this class

View File

@ -1,5 +1,5 @@
/*
* @(#)Features.cpp 1.4 00/03/15
* @(#)Features.cpp 1.4 00/03/15
*
* (C) Copyright IBM Corp. 1998, 1999, 2000, 2001 - All Rights Reserved
*
@ -26,6 +26,14 @@ const FeatureTable *FeatureListTable::getFeatureTable(le_uint16 featureIndex, LE
return (const FeatureTable *) ((char *) this + SWAPW(featureTableOffset));
}
/*
* Note: according to the OpenType Spec. v 1.4, the entries in the Feature
* List Table are sorted alphabetically by feature tag; however, there seem
* to be some fonts which have an unsorted list; that's why the binary search
* is #if 0'd out and replaced by a linear search.
*
* Also note: as of ICU 2.6, this method isn't called anyhow...
*/
const FeatureTable *FeatureListTable::getFeatureTable(LETag featureTag) const
{
#if 0
@ -41,9 +49,9 @@ const FeatureTable *FeatureListTable::getFeatureTable(LETag featureTag) const
int count = SWAPW(featureCount);
for (int i = 0; i < count; i += 1) {
if (SWAPT(featureRecordArray[i].featureTag) == featureTag) {
return (const FeatureTable *) ((char *) this + SWAPW(featureRecordArray[i].featureTableOffset));
}
if (SWAPT(featureRecordArray[i].featureTag) == featureTag) {
return (const FeatureTable *) ((char *) this + SWAPW(featureRecordArray[i].featureTableOffset));
}
}
return 0;

View File

@ -312,12 +312,6 @@ void GlyphIterator::setCursiveFirstExitPoint()
cursiveFirstPosition = position;
}
#if 0
void GlyphIterator::resetCursiveLastExitPoint()
{
cursiveLastPosition = -1;
}
#else
void GlyphIterator::resetCursiveLastExitPoint()
{
if ((lookupFlags & lfBaselineIsLogicalEnd) != 0 && cursiveFirstPosition >= 0 && cursiveLastPosition >= 0) {
@ -338,7 +332,6 @@ void GlyphIterator::resetCursiveLastExitPoint()
cursiveFirstPosition = -1;
cursiveBaselineAdjustment = 0;
}
#endif
void GlyphIterator::setCursiveLastExitPoint(LEPoint &exitPoint)
{
@ -386,7 +379,6 @@ le_bool GlyphIterator::filterGlyph(le_uint32 index) const
LEGlyphID glyphID = glyphs[index];
le_int32 glyphClass = gcdNoGlyphClass;
// FIXME: is this test really safe?
if (LE_GET_GLYPH(glyphID) >= 0xFFFE) {
return true;
}
@ -508,24 +500,9 @@ le_bool GlyphIterator::prev(le_uint32 delta)
return prevInternal(delta) && hasFeatureTag();
}
// FIXME: Why in the world did I write the code that's #if 0'd out?
le_int32 GlyphIterator::getMarkComponent(le_int32 markPosition) const
{
le_int32 component = 0;
#if 0
le_int32 posn, start = position, end = markPosition;
if (markPosition < position) {
start = markPosition;
end = position;
}
for (posn = start; posn <= end; posn += 1) {
if (glyphs[posn] == 0xFFFE) {
component += 1;
}
}
#else
le_int32 posn;
for (posn = position; posn != markPosition; posn += direction) {
@ -533,7 +510,6 @@ le_int32 GlyphIterator::getMarkComponent(le_int32 markPosition) const
component += 1;
}
}
#endif
return component;
}

View File

@ -194,7 +194,10 @@ void OpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int3
float xPlacement = 0;
float yPlacement = 0;
#if 0
// This is where separate kerning adjustments
// should get applied.
xAdjust += xKerning;
yAdjust += yKerning;
#endif

View File

@ -92,6 +92,9 @@ public:
~ParagraphLayout();
// Note: the following is #if 0'd out because there's no good
// way to implement it without either calling layoutEngineFactory()
// or duplicating the logic there...
#if 0
/**
* Examine the given styled paragraph and determine if it contains any text which
@ -102,17 +105,11 @@ public:
*
* @param count is the number of characters in the paragraph.
*
* @param fonts is an array of the <code>LEFontInstance</code> objects associated
* with each font run.
*
* @param fontRunLimits is an array of the run limits of each font run.
*
* @param fontRunCount is the number of font runs.
* @param fontRuns is a pointer to a <code>FontRuns</code> object representing the font runs.
*
* @return <code>true</code> if the paragraph contains complex text.
*/
static le_bool isComplex(const LEUnicode chars[], le_int32 count,
const LEFontInstance *fonts[], const le_int32 fontRunLimits[], le_int32 fontRunCount);
static le_bool isComplex(const LEUnicode chars[], le_int32 count, const FontRuns *fontRuns);
#else
/**
* Examine the given text and determine if it contains characters in any