jdk/src/share/native/sun/font/layout/IndicReordering.h
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
#ifndef __INDICREORDERING_H
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
#define __INDICREORDERING_H
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
#include "LETypes.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
#include "OpenTypeTables.h"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
// Characters that get refered to by name...
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
#define C_SIGN_ZWNJ           0x200C
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
#define C_SIGN_ZWJ            0x200D
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
// Character class values
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
#define CC_RESERVED               0U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
#define CC_VOWEL_MODIFIER         1U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
#define CC_STRESS_MARK            2U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
#define CC_INDEPENDENT_VOWEL      3U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
#define CC_INDEPENDENT_VOWEL_2    4U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
#define CC_INDEPENDENT_VOWEL_3    5U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
#define CC_CONSONANT              6U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
#define CC_CONSONANT_WITH_NUKTA   7U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
#define CC_NUKTA                  8U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
#define CC_DEPENDENT_VOWEL        9U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
#define CC_SPLIT_VOWEL_PIECE_1   10U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
#define CC_SPLIT_VOWEL_PIECE_2   11U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
#define CC_SPLIT_VOWEL_PIECE_3   12U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
#define CC_VIRAMA                13U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
#define CC_ZERO_WIDTH_MARK       14U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
#define CC_COUNT                 15U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
// Character class flags
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
#define CF_CLASS_MASK    0x0000FFFFU
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
#define CF_CONSONANT     0x80000000U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
#define CF_REPH          0x40000000U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
#define CF_VATTU         0x20000000U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
#define CF_BELOW_BASE    0x10000000U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
#define CF_POST_BASE     0x08000000U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
#define CF_LENGTH_MARK   0x04000000U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
#define CF_POS_BEFORE    0x00300000U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
#define CF_POS_BELOW     0x00200000U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
#define CF_POS_ABOVE     0x00100000U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
#define CF_POS_AFTER     0x00000000U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
#define CF_POS_MASK      0x00300000U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
#define CF_INDEX_MASK    0x000F0000U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
#define CF_INDEX_SHIFT   16
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
// Script flag bits
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
#define SF_MATRAS_AFTER_BASE     0x80000000U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
#define SF_REPH_AFTER_BELOW      0x40000000U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
#define SF_EYELASH_RA            0x20000000U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
#define SF_MPRE_FIXUP            0x10000000U
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
#define SF_POST_BASE_LIMIT_MASK  0x0000FFFFU
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
#define SF_NO_POST_BASE_LIMIT    0x00007FFFU
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
typedef LEUnicode SplitMatra[3];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
class MPreFixups;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
class LEGlyphStorage;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
struct IndicClassTable
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
    typedef le_uint32 CharClass;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
    typedef le_uint32 ScriptFlags;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
    LEUnicode firstChar;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
    LEUnicode lastChar;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
    le_int32 worstCaseExpansion;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
    ScriptFlags scriptFlags;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
    const CharClass *classTable;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
    const SplitMatra *splitMatraTable;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    inline le_int32 getWorstCaseExpansion() const;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
    CharClass getCharClass(LEUnicode ch) const;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
    inline const SplitMatra *getSplitMatra(CharClass charClass) const;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    inline le_bool isVowelModifier(LEUnicode ch) const;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
    inline le_bool isStressMark(LEUnicode ch) const;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
    inline le_bool isConsonant(LEUnicode ch) const;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
    inline le_bool isReph(LEUnicode ch) const;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
    inline le_bool isVirama(LEUnicode ch) const;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
    inline le_bool isNukta(LEUnicode ch) const;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
    inline le_bool isVattu(LEUnicode ch) const;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
    inline le_bool isMatra(LEUnicode ch) const;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
    inline le_bool isSplitMatra(LEUnicode ch) const;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
    inline le_bool isLengthMark(LEUnicode ch) const;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
    inline le_bool hasPostOrBelowBaseForm(LEUnicode ch) const;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
    inline le_bool hasPostBaseForm(LEUnicode ch) const;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
    inline le_bool hasBelowBaseForm(LEUnicode ch) const;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
    inline static le_bool isVowelModifier(CharClass charClass);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
    inline static le_bool isStressMark(CharClass charClass);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
    inline static le_bool isConsonant(CharClass charClass);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
    inline static le_bool isReph(CharClass charClass);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
    inline static le_bool isVirama(CharClass charClass);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
    inline static le_bool isNukta(CharClass charClass);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
    inline static le_bool isVattu(CharClass charClass);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
    inline static le_bool isMatra(CharClass charClass);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
    inline static le_bool isSplitMatra(CharClass charClass);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
    inline static le_bool isLengthMark(CharClass charClass);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
    inline static le_bool hasPostOrBelowBaseForm(CharClass charClass);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
    inline static le_bool hasPostBaseForm(CharClass charClass);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
    inline static le_bool hasBelowBaseForm(CharClass charClass);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
    static const IndicClassTable *getScriptClassTable(le_int32 scriptCode);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
class IndicReordering {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
public:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
    static le_int32 getWorstCaseExpansion(le_int32 scriptCode);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
    static le_int32 reorder(const LEUnicode *theChars, le_int32 charCount, le_int32 scriptCode,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
        LEUnicode *outChars, LEGlyphStorage &glyphStorage,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
        MPreFixups **outMPreFixups);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
    static void adjustMPres(MPreFixups *mpreFixups, LEGlyphStorage &glyphStorage);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
    static const FeatureMap *getFeatureMap(le_int32 &count);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
private:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
    // do not instantiate
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
    IndicReordering();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
    static le_int32 findSyllable(const IndicClassTable *classTable, const LEUnicode *chars,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        le_int32 prev, le_int32 charCount);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
inline le_int32 IndicClassTable::getWorstCaseExpansion() const
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
    return worstCaseExpansion;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
inline const SplitMatra *IndicClassTable::getSplitMatra(CharClass charClass) const
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
    le_int32 index = (charClass & CF_INDEX_MASK) >> CF_INDEX_SHIFT;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
    return &splitMatraTable[index - 1];
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
inline le_bool IndicClassTable::isVowelModifier(CharClass charClass)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
    return (charClass & CF_CLASS_MASK) == CC_VOWEL_MODIFIER;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
inline le_bool IndicClassTable::isStressMark(CharClass charClass)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
    return (charClass & CF_CLASS_MASK) == CC_STRESS_MARK;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
inline le_bool IndicClassTable::isConsonant(CharClass charClass)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
    return (charClass & CF_CONSONANT) != 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
inline le_bool IndicClassTable::isReph(CharClass charClass)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
    return (charClass & CF_REPH) != 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
inline le_bool IndicClassTable::isNukta(CharClass charClass)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
    return (charClass & CF_CLASS_MASK) == CC_NUKTA;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
inline le_bool IndicClassTable::isVirama(CharClass charClass)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
    return (charClass & CF_CLASS_MASK) == CC_VIRAMA;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
inline le_bool IndicClassTable::isVattu(CharClass charClass)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
    return (charClass & CF_VATTU) != 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
inline le_bool IndicClassTable::isMatra(CharClass charClass)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
    charClass &= CF_CLASS_MASK;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
    return charClass >= CC_DEPENDENT_VOWEL && charClass <= CC_SPLIT_VOWEL_PIECE_3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
inline le_bool IndicClassTable::isSplitMatra(CharClass charClass)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
    return (charClass & CF_INDEX_MASK) != 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
inline le_bool IndicClassTable::isLengthMark(CharClass charClass)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
    return (charClass & CF_LENGTH_MARK) != 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
inline le_bool IndicClassTable::hasPostOrBelowBaseForm(CharClass charClass)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
    return (charClass & (CF_POST_BASE | CF_BELOW_BASE)) != 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
inline le_bool IndicClassTable::hasPostBaseForm(CharClass charClass)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
    return (charClass & CF_POST_BASE) != 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
inline le_bool IndicClassTable::hasBelowBaseForm(CharClass charClass)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
    return (charClass & CF_BELOW_BASE) != 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
inline le_bool IndicClassTable::isVowelModifier(LEUnicode ch) const
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
    return isVowelModifier(getCharClass(ch));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
inline le_bool IndicClassTable::isStressMark(LEUnicode ch) const
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
    return isStressMark(getCharClass(ch));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
inline le_bool IndicClassTable::isConsonant(LEUnicode ch) const
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
    return isConsonant(getCharClass(ch));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
inline le_bool IndicClassTable::isReph(LEUnicode ch) const
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
    return isReph(getCharClass(ch));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
inline le_bool IndicClassTable::isVirama(LEUnicode ch) const
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
    return isVirama(getCharClass(ch));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
inline le_bool IndicClassTable::isNukta(LEUnicode ch) const
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
    return isNukta(getCharClass(ch));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
inline le_bool IndicClassTable::isVattu(LEUnicode ch) const
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
    return isVattu(getCharClass(ch));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
inline le_bool IndicClassTable::isMatra(LEUnicode ch) const
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
    return isMatra(getCharClass(ch));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
inline le_bool IndicClassTable::isSplitMatra(LEUnicode ch) const
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
    return isSplitMatra(getCharClass(ch));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
inline le_bool IndicClassTable::isLengthMark(LEUnicode ch) const
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
    return isLengthMark(getCharClass(ch));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
inline le_bool IndicClassTable::hasPostOrBelowBaseForm(LEUnicode ch) const
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
    return hasPostOrBelowBaseForm(getCharClass(ch));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
inline le_bool IndicClassTable::hasPostBaseForm(LEUnicode ch) const
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
    return hasPostBaseForm(getCharClass(ch));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
inline le_bool IndicClassTable::hasBelowBaseForm(LEUnicode ch) const
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
{
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
    return hasBelowBaseForm(getCharClass(ch));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
#endif