os/textandloc/fontservices/textshaperplugin/IcuSource/layout/MorphTables.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/textandloc/fontservices/textshaperplugin/IcuSource/layout/MorphTables.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,85 @@
     1.4 +/*
     1.5 + *
     1.6 + * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
     1.7 + *
     1.8 + */
     1.9 +
    1.10 +#ifndef __MORPHTABLES_H
    1.11 +#define __MORPHTABLES_H
    1.12 +
    1.13 +/**
    1.14 + * \file
    1.15 + * \internal
    1.16 + */
    1.17 +
    1.18 +#include "LETypes.h"
    1.19 +#include "LayoutTables.h"
    1.20 +
    1.21 +U_NAMESPACE_BEGIN
    1.22 +
    1.23 +class LEGlyphStorage;
    1.24 +
    1.25 +typedef le_uint32 FeatureFlags;
    1.26 +
    1.27 +typedef le_int16 FeatureType;
    1.28 +typedef le_int16 FeatureSetting;
    1.29 +
    1.30 +struct FeatureTableEntry
    1.31 +{
    1.32 +    FeatureType     featureType;
    1.33 +    FeatureSetting  featureSetting;
    1.34 +    FeatureFlags    enableFlags;
    1.35 +    FeatureFlags    disableFlags;
    1.36 +};
    1.37 +
    1.38 +struct ChainHeader
    1.39 +{
    1.40 +    FeatureFlags        defaultFlags;
    1.41 +    le_uint32           chainLength;
    1.42 +    le_int16           nFeatureEntries;
    1.43 +    le_int16           nSubtables;
    1.44 +    FeatureTableEntry   featureTable[ANY_NUMBER];
    1.45 +};
    1.46 +
    1.47 +struct MorphTableHeader
    1.48 +{
    1.49 +    le_int32    version;
    1.50 +    le_uint32   nChains;
    1.51 +    ChainHeader chains[ANY_NUMBER];
    1.52 +
    1.53 +    void process(LEGlyphStorage &glyphStorage) const;
    1.54 +};
    1.55 +
    1.56 +typedef le_int16 SubtableCoverage;
    1.57 +
    1.58 +enum SubtableCoverageFlags
    1.59 +{
    1.60 +    scfVertical = 0x8000,
    1.61 +    scfReverse  = 0x4000,
    1.62 +    scfIgnoreVt = 0x2000,
    1.63 +    scfReserved = 0x1FF8,
    1.64 +    scfTypeMask = 0x0007
    1.65 +};
    1.66 +
    1.67 +enum MorphSubtableType
    1.68 +{
    1.69 +    mstIndicRearrangement               = 0,
    1.70 +    mstContextualGlyphSubstitution      = 1,
    1.71 +    mstLigatureSubstitution             = 2,
    1.72 +    mstReservedUnused                   = 3,
    1.73 +    mstNonContextualGlyphSubstitution   = 4,
    1.74 +    mstContextualGlyphInsertion         = 5
    1.75 +};
    1.76 +
    1.77 +struct MorphSubtableHeader
    1.78 +{
    1.79 +    le_int16           length;
    1.80 +    SubtableCoverage    coverage;
    1.81 +    FeatureFlags        subtableFeatures;
    1.82 +
    1.83 +    void process(LEGlyphStorage &glyphStorage) const;
    1.84 +};
    1.85 +
    1.86 +U_NAMESPACE_END
    1.87 +#endif
    1.88 +