1/* 2 * 3 * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved 4 * 5 */ 6 7#ifndef __MORPHTABLES_H 8#define __MORPHTABLES_H 9 10/** 11 * \file 12 * \internal 13 */ 14 15#include "LETypes.h" 16#include "LayoutTables.h" 17 18U_NAMESPACE_BEGIN 19 20class LEGlyphStorage; 21 22typedef le_uint32 FeatureFlags; 23 24typedef le_int16 FeatureType; 25typedef le_int16 FeatureSetting; 26 27struct FeatureTableEntry 28{ 29 FeatureType featureType; 30 FeatureSetting featureSetting; 31 FeatureFlags enableFlags; 32 FeatureFlags disableFlags; 33}; 34 35struct ChainHeader 36{ 37 FeatureFlags defaultFlags; 38 le_uint32 chainLength; 39 le_int16 nFeatureEntries; 40 le_int16 nSubtables; 41 FeatureTableEntry featureTable[ANY_NUMBER]; 42}; 43 44struct MorphTableHeader 45{ 46 le_int32 version; 47 le_uint32 nChains; 48 ChainHeader chains[ANY_NUMBER]; 49 50 void process(LEGlyphStorage &glyphStorage) const; 51}; 52 53typedef le_int16 SubtableCoverage; 54 55enum SubtableCoverageFlags 56{ 57 scfVertical = 0x8000, 58 scfReverse = 0x4000, 59 scfIgnoreVt = 0x2000, 60 scfReserved = 0x1FF8, 61 scfTypeMask = 0x0007 62}; 63 64enum MorphSubtableType 65{ 66 mstIndicRearrangement = 0, 67 mstContextualGlyphSubstitution = 1, 68 mstLigatureSubstitution = 2, 69 mstReservedUnused = 3, 70 mstNonContextualGlyphSubstitution = 4, 71 mstContextualGlyphInsertion = 5 72}; 73 74struct MorphSubtableHeader 75{ 76 le_int16 length; 77 SubtableCoverage coverage; 78 FeatureFlags subtableFeatures; 79 80 void process(LEGlyphStorage &glyphStorage) const; 81}; 82 83U_NAMESPACE_END 84#endif 85 86