1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/textandloc/fontservices/textshaperplugin/IcuSource/layout/LookupProcessor.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,83 @@
1.4 +/*
1.5 + * %W% %E%
1.6 + *
1.7 + * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
1.8 + *
1.9 + */
1.10 +
1.11 +#ifndef __LOOKUPPROCESSOR_H
1.12 +#define __LOOKUPPROCESSOR_H
1.13 +
1.14 +/**
1.15 + * \file
1.16 + * \internal
1.17 + */
1.18 +
1.19 +#include "LETypes.h"
1.20 +#include "LEFontInstance.h"
1.21 +#include "OpenTypeTables.h"
1.22 +//#include "Lookups.h"
1.23 +//#include "Features.h"
1.24 +
1.25 +U_NAMESPACE_BEGIN
1.26 +
1.27 +class LEFontInstance;
1.28 +class LEGlyphStorage;
1.29 +class GlyphIterator;
1.30 +class GlyphPositionAdjustments;
1.31 +struct FeatureTable;
1.32 +struct FeatureListTable;
1.33 +struct GlyphDefinitionTableHeader;
1.34 +struct LookupSubtable;
1.35 +struct LookupTable;
1.36 +
1.37 +class LookupProcessor : public UMemory {
1.38 +public:
1.39 + static const LETag notSelected;
1.40 + static const LETag defaultFeature;
1.41 +
1.42 + le_bool isBogus();
1.43 +
1.44 + le_int32 process(LEGlyphStorage &glyphStorage,
1.45 + GlyphPositionAdjustments *glyphPositionAdjustments, le_bool rightToLeft,
1.46 + const GlyphDefinitionTableHeader *glyphDefinitionTableHeader,
1.47 + const LEFontInstance *fontInstance, LEErrorCode& success) const;
1.48 +
1.49 + le_uint32 applyLookupTable(const LookupTable *lookupTable, GlyphIterator *glyphIterator,
1.50 + const LEFontInstance *fontInstance, LEErrorCode& success) const;
1.51 +
1.52 + le_uint32 applySingleLookup(le_uint16 lookupTableIndex, GlyphIterator *glyphIterator,
1.53 + const LEFontInstance *fontInstance, LEErrorCode& success) const;
1.54 +
1.55 + virtual le_uint32 applySubtable(const LookupSubtable *lookupSubtable, le_uint16 subtableType,
1.56 + GlyphIterator *glyphIterator, const LEFontInstance *fontInstance,
1.57 + LEErrorCode& success) const = 0;
1.58 +
1.59 + virtual ~LookupProcessor();
1.60 +
1.61 +protected:
1.62 + LookupProcessor(const char *baseAddress,
1.63 + Offset scriptListOffset, Offset featureListOffset, Offset lookupListOffset,
1.64 + LETag scriptTag, LETag languageTag, const LETag *featureOrder);
1.65 +
1.66 + LookupProcessor();
1.67 +
1.68 + le_int32 selectLookups(const FeatureTable *featureTable, LETag featureTag, le_int32 order);
1.69 +
1.70 + const LookupListTable *lookupListTable;
1.71 + const FeatureListTable *featureListTable;
1.72 +
1.73 + LETag *lookupSelectArray;
1.74 + LETag requiredFeatureTag;
1.75 +
1.76 + le_uint16 *lookupOrderArray;
1.77 + le_uint32 lookupOrderCount;
1.78 +
1.79 +private:
1.80 +
1.81 + LookupProcessor(const LookupProcessor &other); // forbid copying of this class
1.82 + LookupProcessor &operator=(const LookupProcessor &other); // forbid copying of this class
1.83 +};
1.84 +
1.85 +U_NAMESPACE_END
1.86 +#endif