jdk/src/share/native/sun/font/layout/ArabicShaping.cpp
author duke
Sat, 01 Dec 2007 00:00:00 +0000
changeset 2 90ce3da70b43
child 3935 afcdb712a9c5
permissions -rw-r--r--
Initial load
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * by Sun in the LICENSE file that accompanied this code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
 * CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 * have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#include "LETypes.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
#include "OpenTypeTables.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
#include "ArabicShaping.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
#include "LEGlyphStorage.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
#include "ClassDefinitionTables.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
// This table maps Unicode joining types to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
// ShapeTypes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
const ArabicShaping::ShapeType ArabicShaping::shapeTypes[] =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
    ArabicShaping::ST_NOSHAPE_NONE, // [U]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
    ArabicShaping::ST_NOSHAPE_DUAL, // [C]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
    ArabicShaping::ST_DUAL,         // [D]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
    ArabicShaping::ST_LEFT,         // [L]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
    ArabicShaping::ST_RIGHT,        // [R]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
    ArabicShaping::ST_TRANSPARENT   // [T]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
    shaping array holds types for Arabic chars between 0610 and 0700
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
    other values are either unshaped, or transparent if a mark or format
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
    code, except for format codes 200c (zero-width non-joiner) and 200d
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
    (dual-width joiner) which are both unshaped and non_joining or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
    dual-joining, respectively.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
ArabicShaping::ShapeType ArabicShaping::getShapeType(LEUnicode c)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    const ClassDefinitionTable *joiningTypes = (const ClassDefinitionTable *) ArabicShaping::shapingTypeTable;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
    le_int32 joiningType = joiningTypes->getGlyphClass(c);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
    if (joiningType >= 0 && joiningType < ArabicShaping::JT_COUNT) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
        return ArabicShaping::shapeTypes[joiningType];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
    return ArabicShaping::ST_NOSHAPE_NONE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
#define isolFeatureTag LE_ISOL_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
#define initFeatureTag LE_INIT_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
#define mediFeatureTag LE_MEDI_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
#define finaFeatureTag LE_FINA_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
#define ligaFeatureTag LE_LIGA_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
#define msetFeatureTag LE_MSET_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
#define markFeatureTag LE_MARK_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
#define ccmpFeatureTag LE_CCMP_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
#define rligFeatureTag LE_RLIG_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
#define caltFeatureTag LE_CALT_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
#define dligFeatureTag LE_DLIG_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
#define cswhFeatureTag LE_CSWH_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
#define cursFeatureTag LE_CURS_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
#define kernFeatureTag LE_KERN_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
#define mkmkFeatureTag LE_MKMK_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
// NOTE:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
// The isol, fina, init and medi features must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
// defined in the above order, and have masks that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
// are all in the same nibble.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
#define isolFeatureMask 0x80000000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
#define finaFeatureMask 0x40000000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
#define initFeatureMask 0x20000000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
#define mediFeatureMask 0x10000000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
#define ccmpFeatureMask 0x08000000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
#define rligFeatureMask 0x04000000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
#define caltFeatureMask 0x02000000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
#define ligaFeatureMask 0x01000000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
#define dligFeatureMask 0x00800000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
#define cswhFeatureMask 0x00400000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
#define msetFeatureMask 0x00200000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
#define cursFeatureMask 0x00100000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
#define kernFeatureMask 0x00080000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
#define markFeatureMask 0x00040000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
#define mkmkFeatureMask 0x00020000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
#define ISOL_FEATURES (isolFeatureMask | ligaFeatureMask | msetFeatureMask | \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    markFeatureMask | ccmpFeatureMask | rligFeatureMask | caltFeatureMask | \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
    dligFeatureMask | cswhFeatureMask | cursFeatureMask | kernFeatureMask | mkmkFeatureMask)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
#define SHAPE_MASK 0xF0000000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
static const FeatureMap featureMap[] = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    {ccmpFeatureTag, ccmpFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
    {isolFeatureTag, isolFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
    {finaFeatureTag, finaFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    {mediFeatureTag, mediFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
    {initFeatureTag, initFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
    {rligFeatureTag, rligFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
    {caltFeatureTag, caltFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
    {ligaFeatureTag, ligaFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
    {dligFeatureTag, dligFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
    {cswhFeatureTag, cswhFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
    {msetFeatureTag, msetFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
    {cursFeatureTag, cursFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
    {kernFeatureTag, kernFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
    {markFeatureTag, markFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
    {mkmkFeatureTag, mkmkFeatureMask}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
const FeatureMap *ArabicShaping::getFeatureMap(le_int32 &count)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
    count = LE_ARRAY_SIZE(featureMap);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
    return featureMap;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
void ArabicShaping::adjustTags(le_int32 outIndex, le_int32 shapeOffset, LEGlyphStorage &glyphStorage)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
    LEErrorCode success = LE_NO_ERROR;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
    FeatureMask featureMask = (FeatureMask) glyphStorage.getAuxData(outIndex, success);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
    FeatureMask shape = featureMask & SHAPE_MASK;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
    shape >>= shapeOffset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
    glyphStorage.setAuxData(outIndex, ((featureMask & ~SHAPE_MASK) | shape), success);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
void ArabicShaping::shape(const LEUnicode *chars, le_int32 offset, le_int32 charCount, le_int32 charMax,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
                          le_bool rightToLeft, LEGlyphStorage &glyphStorage)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
    // iterate in logical order, store tags in visible order
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
    // the effective right char is the most recently encountered
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
    // non-transparent char
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
    // four boolean states:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
    //   the effective right char shapes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
    //   the effective right char causes left shaping
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
    //   the current char shapes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
    //   the current char causes right shaping
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
    // if both cause shaping, then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
    //   shaper.shape(errout, 2) (isolate to initial, or final to medial)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
    //   shaper.shape(out, 1) (isolate to final)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
    ShapeType rightType = ST_NOSHAPE_NONE, leftType = ST_NOSHAPE_NONE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
    LEErrorCode success = LE_NO_ERROR;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
    le_int32 i;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
    for (i = offset - 1; i >= 0; i -= 1) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
        rightType = getShapeType(chars[i]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
        if (rightType != ST_TRANSPARENT) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
            break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
    for (i = offset + charCount; i < charMax; i += 1) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
        leftType = getShapeType(chars[i]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
        if (leftType != ST_TRANSPARENT) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
            break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
    // erout is effective right logical index
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
    le_int32 erout = -1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
    le_bool rightShapes = FALSE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
    le_bool rightCauses = (rightType & MASK_SHAPE_LEFT) != 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
    le_int32 in, e, out = 0, dir = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
    if (rightToLeft) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
        out = charCount - 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
        erout = charCount;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
        dir = -1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
    for (in = offset, e = offset + charCount; in < e; in += 1, out += dir) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
        LEUnicode c = chars[in];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
        ShapeType t = getShapeType(c);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
        glyphStorage.setAuxData(out, ISOL_FEATURES, success);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
        if ((t & MASK_TRANSPARENT) != 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
            continue;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
        le_bool curShapes = (t & MASK_NOSHAPE) == 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
        le_bool curCauses = (t & MASK_SHAPE_RIGHT) != 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
        if (rightCauses && curCauses) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
            if (rightShapes) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
                adjustTags(erout, 2, glyphStorage);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
            if (curShapes) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
                adjustTags(out, 1, glyphStorage);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
        rightShapes = curShapes;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
        rightCauses = (t & MASK_SHAPE_LEFT) != 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
        erout = out;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
    if (rightShapes && rightCauses && (leftType & MASK_SHAPE_RIGHT) != 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
        adjustTags(erout, 2, glyphStorage);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
}