jdk/src/java.desktop/share/native/libfontmanager/layout/ArabicShaping.cpp
author prr
Wed, 29 Jul 2015 11:04:39 -0700
changeset 33299 78f5508cde89
parent 25859 3317bb8137f4
permissions -rw-r--r--
8132042: Preserve layout presentation Reviewed-by: mschoene, srl, serb
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
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3935
diff changeset
     6
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3935
diff changeset
     8
 * by Oracle in the LICENSE file that accompanied this code.
2
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
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3935
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3935
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 3935
diff changeset
    22
 * questions.
2
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
3935
afcdb712a9c5 6501644: sync LayoutEngine *code* structure to match ICU
srl
parents: 2
diff changeset
    38
U_NAMESPACE_BEGIN
afcdb712a9c5 6501644: sync LayoutEngine *code* structure to match ICU
srl
parents: 2
diff changeset
    39
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
// This table maps Unicode joining types to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
// ShapeTypes.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
const ArabicShaping::ShapeType ArabicShaping::shapeTypes[] =
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
    ArabicShaping::ST_NOSHAPE_NONE, // [U]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
    ArabicShaping::ST_NOSHAPE_DUAL, // [C]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
    ArabicShaping::ST_DUAL,         // [D]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
    ArabicShaping::ST_LEFT,         // [L]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
    ArabicShaping::ST_RIGHT,        // [R]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
    ArabicShaping::ST_TRANSPARENT   // [T]
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
    shaping array holds types for Arabic chars between 0610 and 0700
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
    other values are either unshaped, or transparent if a mark or format
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
    code, except for format codes 200c (zero-width non-joiner) and 200d
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
    (dual-width joiner) which are both unshaped and non_joining or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
    dual-joining, respectively.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
*/
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
ArabicShaping::ShapeType ArabicShaping::getShapeType(LEUnicode c)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
{
16891
91e99bed64ae 8001031: Better font processing
prr
parents: 7486
diff changeset
    61
  LEErrorCode success = LE_NO_ERROR;
22330
cafb826672bd 8024530: Enhance font process resilience
prr
parents: 16891
diff changeset
    62
  const LEReferenceTo<ClassDefinitionTable> joiningTypes(LETableReference::kStaticData,
cafb826672bd 8024530: Enhance font process resilience
prr
parents: 16891
diff changeset
    63
                                                         (const ClassDefinitionTable *) ArabicShaping::shapingTypeTable,
16891
91e99bed64ae 8001031: Better font processing
prr
parents: 7486
diff changeset
    64
                                                         ArabicShaping::shapingTypeTableLen);
91e99bed64ae 8001031: Better font processing
prr
parents: 7486
diff changeset
    65
  le_int32 joiningType = joiningTypes->getGlyphClass(joiningTypes, c, success);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
16891
91e99bed64ae 8001031: Better font processing
prr
parents: 7486
diff changeset
    67
  if (joiningType >= 0 && joiningType < ArabicShaping::JT_COUNT && LE_SUCCESS(success)) {
91e99bed64ae 8001031: Better font processing
prr
parents: 7486
diff changeset
    68
    return ArabicShaping::shapeTypes[joiningType];
91e99bed64ae 8001031: Better font processing
prr
parents: 7486
diff changeset
    69
  }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
16891
91e99bed64ae 8001031: Better font processing
prr
parents: 7486
diff changeset
    71
  return ArabicShaping::ST_NOSHAPE_NONE;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
#define isolFeatureTag LE_ISOL_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
#define initFeatureTag LE_INIT_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
#define mediFeatureTag LE_MEDI_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
#define finaFeatureTag LE_FINA_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
#define ligaFeatureTag LE_LIGA_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
#define msetFeatureTag LE_MSET_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
#define markFeatureTag LE_MARK_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
#define ccmpFeatureTag LE_CCMP_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
#define rligFeatureTag LE_RLIG_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
#define caltFeatureTag LE_CALT_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
#define dligFeatureTag LE_DLIG_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
#define cswhFeatureTag LE_CSWH_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
#define cursFeatureTag LE_CURS_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
#define kernFeatureTag LE_KERN_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
#define mkmkFeatureTag LE_MKMK_FEATURE_TAG
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
// NOTE:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
// The isol, fina, init and medi features must be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
// defined in the above order, and have masks that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
// are all in the same nibble.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
#define isolFeatureMask 0x80000000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
#define finaFeatureMask 0x40000000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
#define initFeatureMask 0x20000000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
#define mediFeatureMask 0x10000000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
#define ccmpFeatureMask 0x08000000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
#define rligFeatureMask 0x04000000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
#define caltFeatureMask 0x02000000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
#define ligaFeatureMask 0x01000000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
#define dligFeatureMask 0x00800000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
#define cswhFeatureMask 0x00400000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
#define msetFeatureMask 0x00200000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
#define cursFeatureMask 0x00100000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
#define kernFeatureMask 0x00080000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
#define markFeatureMask 0x00040000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
#define mkmkFeatureMask 0x00020000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
7486
6a36b1ebc620 6886358: layout code update
srl
parents: 5506
diff changeset
   110
#define NO_FEATURES   0
3935
afcdb712a9c5 6501644: sync LayoutEngine *code* structure to match ICU
srl
parents: 2
diff changeset
   111
#define ISOL_FEATURES (isolFeatureMask | ligaFeatureMask | msetFeatureMask | markFeatureMask | ccmpFeatureMask | rligFeatureMask | caltFeatureMask | dligFeatureMask | cswhFeatureMask | cursFeatureMask | kernFeatureMask | mkmkFeatureMask)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
#define SHAPE_MASK 0xF0000000UL
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
static const FeatureMap featureMap[] = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
    {ccmpFeatureTag, ccmpFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
    {isolFeatureTag, isolFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
    {finaFeatureTag, finaFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
    {mediFeatureTag, mediFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
    {initFeatureTag, initFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
    {rligFeatureTag, rligFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
    {caltFeatureTag, caltFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
    {ligaFeatureTag, ligaFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
    {dligFeatureTag, dligFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
    {cswhFeatureTag, cswhFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
    {msetFeatureTag, msetFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
    {cursFeatureTag, cursFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
    {kernFeatureTag, kernFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
    {markFeatureTag, markFeatureMask},
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
    {mkmkFeatureTag, mkmkFeatureMask}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
const FeatureMap *ArabicShaping::getFeatureMap(le_int32 &count)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
    count = LE_ARRAY_SIZE(featureMap);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
    return featureMap;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
void ArabicShaping::adjustTags(le_int32 outIndex, le_int32 shapeOffset, LEGlyphStorage &glyphStorage)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
    LEErrorCode success = LE_NO_ERROR;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
    FeatureMask featureMask = (FeatureMask) glyphStorage.getAuxData(outIndex, success);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
    FeatureMask shape = featureMask & SHAPE_MASK;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
    shape >>= shapeOffset;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
    glyphStorage.setAuxData(outIndex, ((featureMask & ~SHAPE_MASK) | shape), success);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
void ArabicShaping::shape(const LEUnicode *chars, le_int32 offset, le_int32 charCount, le_int32 charMax,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
                          le_bool rightToLeft, LEGlyphStorage &glyphStorage)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
    // iterate in logical order, store tags in visible order
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
    // the effective right char is the most recently encountered
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
    // non-transparent char
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
    // four boolean states:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
    //   the effective right char shapes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
    //   the effective right char causes left shaping
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
    //   the current char shapes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
    //   the current char causes right shaping
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
    //
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
    // if both cause shaping, then
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
    //   shaper.shape(errout, 2) (isolate to initial, or final to medial)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
    //   shaper.shape(out, 1) (isolate to final)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
    ShapeType rightType = ST_NOSHAPE_NONE, leftType = ST_NOSHAPE_NONE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
    LEErrorCode success = LE_NO_ERROR;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
    le_int32 i;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
    for (i = offset - 1; i >= 0; i -= 1) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
        rightType = getShapeType(chars[i]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
        if (rightType != ST_TRANSPARENT) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
            break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
    for (i = offset + charCount; i < charMax; i += 1) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
        leftType = getShapeType(chars[i]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
        if (leftType != ST_TRANSPARENT) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
            break;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
    // erout is effective right logical index
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
    le_int32 erout = -1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
    le_bool rightShapes = FALSE;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
    le_bool rightCauses = (rightType & MASK_SHAPE_LEFT) != 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
    le_int32 in, e, out = 0, dir = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
    if (rightToLeft) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
        out = charCount - 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
        erout = charCount;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
        dir = -1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
    for (in = offset, e = offset + charCount; in < e; in += 1, out += dir) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
        LEUnicode c = chars[in];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
        ShapeType t = getShapeType(c);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
7486
6a36b1ebc620 6886358: layout code update
srl
parents: 5506
diff changeset
   205
        if (t == ST_NOSHAPE_NONE) {
6a36b1ebc620 6886358: layout code update
srl
parents: 5506
diff changeset
   206
            glyphStorage.setAuxData(out, NO_FEATURES, success);
6a36b1ebc620 6886358: layout code update
srl
parents: 5506
diff changeset
   207
        } else {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
        glyphStorage.setAuxData(out, ISOL_FEATURES, success);
7486
6a36b1ebc620 6886358: layout code update
srl
parents: 5506
diff changeset
   209
        }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
        if ((t & MASK_TRANSPARENT) != 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
            continue;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
        le_bool curShapes = (t & MASK_NOSHAPE) == 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
        le_bool curCauses = (t & MASK_SHAPE_RIGHT) != 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
        if (rightCauses && curCauses) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
            if (rightShapes) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
                adjustTags(erout, 2, glyphStorage);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
            if (curShapes) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
                adjustTags(out, 1, glyphStorage);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
        rightShapes = curShapes;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
        rightCauses = (t & MASK_SHAPE_LEFT) != 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
        erout = out;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
    if (rightShapes && rightCauses && (leftType & MASK_SHAPE_RIGHT) != 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
        adjustTags(erout, 2, glyphStorage);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
}
3935
afcdb712a9c5 6501644: sync LayoutEngine *code* structure to match ICU
srl
parents: 2
diff changeset
   237
afcdb712a9c5 6501644: sync LayoutEngine *code* structure to match ICU
srl
parents: 2
diff changeset
   238
U_NAMESPACE_END