src/java.desktop/share/classes/java/awt/font/NumericShaper.java
author serb
Mon, 09 Sep 2019 12:23:22 -0700
changeset 58325 d32a3b1ca84a
parent 52633 f94ac11610b3
permissions -rw-r--r--
8225372: accessibility errors in tables in java.desktop files Reviewed-by: aivanov
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
58325
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52633
diff changeset
     2
 * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5447
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5447
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5447
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5447
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 5447
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package java.awt.font;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    28
import java.io.IOException;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    29
import java.io.ObjectOutputStream;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    30
import java.util.Arrays;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    31
import java.util.Comparator;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    32
import java.util.EnumSet;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    33
import java.util.Set;
52427
3c6aa484536c 8211122: Reduce the number of internal classes made accessible to jdk.unsupported
mchung
parents: 50045
diff changeset
    34
import jdk.internal.access.SharedSecrets;
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    35
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
/**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
    37
 * The {@code NumericShaper} class is used to convert Latin-1 (European)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * digits to other Unicode decimal digits.  Users of this class will
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * primarily be people who wish to present data using
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * national digit shapes, but find it more convenient to represent the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * data internally using Latin-1 (European) digits.  This does not
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * interpret the deprecated numeric shape selector character (U+206E).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * <p>
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
    44
 * Instances of {@code NumericShaper} are typically applied
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * as attributes to text with the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * {@link TextAttribute#NUMERIC_SHAPING NUMERIC_SHAPING} attribute
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
    47
 * of the {@code TextAttribute} class.
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
    48
 * For example, this code snippet causes a {@code TextLayout} to
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * shape European digits to Arabic in an Arabic context:<br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * <blockquote><pre>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * Map map = new HashMap();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 * map.put(TextAttribute.NUMERIC_SHAPING,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 *     NumericShaper.getContextualShaper(NumericShaper.ARABIC));
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * FontRenderContext frc = ...;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 * TextLayout layout = new TextLayout(text, map, frc);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 * layout.draw(g2d, x, y);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 * </pre></blockquote>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 * <br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 * It is also possible to perform numeric shaping explicitly using instances
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
    60
 * of {@code NumericShaper}, as this code snippet demonstrates:<br>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 * <blockquote><pre>
7781
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
    62
 * char[] text = ...;
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
    63
 * // shape all EUROPEAN digits (except zero) to ARABIC digits
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
    64
 * NumericShaper shaper = NumericShaper.getShaper(NumericShaper.ARABIC);
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
    65
 * shaper.shape(text, start, count);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 *
7781
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
    67
 * // shape European digits to ARABIC digits if preceding text is Arabic, or
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
    68
 * // shape European digits to TAMIL digits if preceding text is Tamil, or
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
    69
 * // leave European digits alone if there is no preceding text, or
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
    70
 * // preceding text is neither Arabic nor Tamil
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
    71
 * NumericShaper shaper =
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
    72
 *     NumericShaper.getContextualShaper(NumericShaper.ARABIC |
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
    73
 *                                         NumericShaper.TAMIL,
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
    74
 *                                       NumericShaper.EUROPEAN);
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
    75
 * shaper.shape(text, start, count);
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    76
 * </pre></blockquote>
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    77
 *
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    78
 * <p><b>Bit mask- and enum-based Unicode ranges</b></p>
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    79
 *
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    80
 * <p>This class supports two different programming interfaces to
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    81
 * represent Unicode ranges for script-specific digits: bit
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    82
 * mask-based ones, such as {@link #ARABIC NumericShaper.ARABIC}, and
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    83
 * enum-based ones, such as {@link NumericShaper.Range#ARABIC}.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    84
 * Multiple ranges can be specified by ORing bit mask-based constants,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    85
 * such as:
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    86
 * <blockquote><pre>
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    87
 * NumericShaper.ARABIC | NumericShaper.TAMIL
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
 * </pre></blockquote>
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    89
 * or creating a {@code Set} with the {@link NumericShaper.Range}
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    90
 * constants, such as:
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    91
 * <blockquote><pre>
26749
b6598aa90114 8055326: Fix typos in client-related packages
serb
parents: 25859
diff changeset
    92
 * EnumSet.of(NumericShaper.Range.ARABIC, NumericShaper.Range.TAMIL)
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    93
 * </pre></blockquote>
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    94
 * The enum-based ranges are a super set of the bit mask-based ones.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    95
 *
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    96
 * <p>If the two interfaces are mixed (including serialization),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    97
 * Unicode range values are mapped to their counterparts where such
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    98
 * mapping is possible, such as {@code NumericShaper.Range.ARABIC}
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
    99
 * from/to {@code NumericShaper.ARABIC}.  If any unmappable range
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   100
 * values are specified, such as {@code NumericShaper.Range.BALINESE},
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   101
 * those ranges are ignored.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
 *
7781
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
   103
 * <p><b>Decimal Digits Precedence</b></p>
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
   104
 *
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
   105
 * <p>A Unicode range may have more than one set of decimal digits. If
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
   106
 * multiple decimal digits sets are specified for the same Unicode
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
   107
 * range, one of the sets will take precedence as follows.
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
   108
 *
45648
87c997b74bb8 8180326: Update the tables in java.desktop to be HTML-5 friendly
serb
parents: 35692
diff changeset
   109
 * <table class="plain">
87c997b74bb8 8180326: Update the tables in java.desktop to be HTML-5 friendly
serb
parents: 35692
diff changeset
   110
 * <caption>NumericShaper constants precedence</caption>
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   111
 * <thead>
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   112
 *   <tr>
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   113
 *     <th scope="col">Unicode Range
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   114
 *     <th scope="col">{@code NumericShaper} Constants
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   115
 *     <th scope="col">Precedence
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   116
 * </thead>
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   117
 * <tbody>
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   118
 *   <tr>
58325
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52633
diff changeset
   119
 *     <th scope="rowgroup" rowspan="2">Arabic
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   120
 *     <td>{@link NumericShaper#ARABIC NumericShaper.ARABIC}
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   121
 *     <br>
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   122
 *     {@link NumericShaper#EASTERN_ARABIC NumericShaper.EASTERN_ARABIC}
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   123
 *     <td>{@link NumericShaper#EASTERN_ARABIC NumericShaper.EASTERN_ARABIC}
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   124
 *   </tr>
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   125
 *   <tr>
58325
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52633
diff changeset
   126
 *     <td>{@link NumericShaper.Range#ARABIC}
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   127
 *     <br>
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   128
 *     {@link NumericShaper.Range#EASTERN_ARABIC}
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   129
 *     <td>{@link NumericShaper.Range#EASTERN_ARABIC}
58325
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52633
diff changeset
   130
 * </tbody>
d32a3b1ca84a 8225372: accessibility errors in tables in java.desktop files
serb
parents: 52633
diff changeset
   131
 * <tbody>
47498
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   132
 *   <tr>
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   133
 *     <th scope="row">Tai Tham
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   134
 *     <td>{@link NumericShaper.Range#TAI_THAM_HORA}
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   135
 *     <br>
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   136
 *     {@link NumericShaper.Range#TAI_THAM_THAM}
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   137
 *     <td>{@link NumericShaper.Range#TAI_THAM_THAM}
aa0344e6f39b 8184219: Fix accessibility of tables in the java.desktop module
serb
parents: 47216
diff changeset
   138
 * </tbody>
7781
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
   139
 * </table>
278dac28f3d1 6943959: NumericShaper API doc doesn't describe ARABIC/EASTERN_ARABIC precedence
okutsu
parents: 7247
diff changeset
   140
 *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
 * @since 1.4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
public final class NumericShaper implements java.io.Serializable {
25385
2c53e38b77aa 8038092: Re-examine Bidi reflective dependency on java.awt.font
naoto
parents: 23010
diff changeset
   144
2c53e38b77aa 8038092: Re-examine Bidi reflective dependency on java.awt.font
naoto
parents: 23010
diff changeset
   145
    // For access from java.text.Bidi
2c53e38b77aa 8038092: Re-examine Bidi reflective dependency on java.awt.font
naoto
parents: 23010
diff changeset
   146
    static {
2c53e38b77aa 8038092: Re-examine Bidi reflective dependency on java.awt.font
naoto
parents: 23010
diff changeset
   147
        if (SharedSecrets.getJavaAWTFontAccess() == null) {
2c53e38b77aa 8038092: Re-examine Bidi reflective dependency on java.awt.font
naoto
parents: 23010
diff changeset
   148
            SharedSecrets.setJavaAWTFontAccess(new JavaAWTFontAccessImpl());
2c53e38b77aa 8038092: Re-examine Bidi reflective dependency on java.awt.font
naoto
parents: 23010
diff changeset
   149
        }
2c53e38b77aa 8038092: Re-examine Bidi reflective dependency on java.awt.font
naoto
parents: 23010
diff changeset
   150
    }
2c53e38b77aa 8038092: Re-examine Bidi reflective dependency on java.awt.font
naoto
parents: 23010
diff changeset
   151
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   152
    /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   153
     * A {@code NumericShaper.Range} represents a Unicode range of a
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   154
     * script having its own decimal digits. For example, the {@link
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   155
     * NumericShaper.Range#THAI} range has the Thai digits, THAI DIGIT
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   156
     * ZERO (U+0E50) to THAI DIGIT NINE (U+0E59).
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   157
     *
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
   158
     * <p>The {@code Range} enum replaces the traditional bit
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   159
     * mask-based values (e.g., {@link NumericShaper#ARABIC}), and
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   160
     * supports more Unicode ranges than the bit mask-based ones. For
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   161
     * example, the following code using the bit mask:
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   162
     * <blockquote><pre>
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   163
     * NumericShaper.getContextualShaper(NumericShaper.ARABIC |
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   164
     *                                     NumericShaper.TAMIL,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   165
     *                                   NumericShaper.EUROPEAN);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   166
     * </pre></blockquote>
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   167
     * can be written using this enum as:
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   168
     * <blockquote><pre>
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   169
     * NumericShaper.getContextualShaper(EnumSet.of(
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   170
     *                                     NumericShaper.Range.ARABIC,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   171
     *                                     NumericShaper.Range.TAMIL),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   172
     *                                   NumericShaper.Range.EUROPEAN);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   173
     * </pre></blockquote>
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   174
     *
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   175
     * @since 1.7
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   176
     */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   177
    public static enum Range {
5281
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   178
        // The order of EUROPEAN to MOGOLIAN must be consistent
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   179
        // with the bitmask-based constants.
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   180
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   181
         * The Latin (European) range with the Latin (ASCII) digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   182
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   183
        EUROPEAN        ('\u0030', '\u0000', '\u0300'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   184
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   185
         * The Arabic range with the Arabic-Indic digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   186
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   187
        ARABIC          ('\u0660', '\u0600', '\u0780'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   188
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   189
         * The Arabic range with the Eastern Arabic-Indic digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   190
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   191
        EASTERN_ARABIC  ('\u06f0', '\u0600', '\u0780'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   192
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   193
         * The Devanagari range with the Devanagari digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   194
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   195
        DEVANAGARI      ('\u0966', '\u0900', '\u0980'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   196
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   197
         * The Bengali range with the Bengali digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   198
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   199
        BENGALI         ('\u09e6', '\u0980', '\u0a00'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   200
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   201
         * The Gurmukhi range with the Gurmukhi digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   202
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   203
        GURMUKHI        ('\u0a66', '\u0a00', '\u0a80'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   204
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   205
         * The Gujarati range with the Gujarati digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   206
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   207
        GUJARATI        ('\u0ae6', '\u0b00', '\u0b80'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   208
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   209
         * The Oriya range with the Oriya digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   210
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   211
        ORIYA           ('\u0b66', '\u0b00', '\u0b80'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   212
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   213
         * The Tamil range with the Tamil digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   214
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   215
        TAMIL           ('\u0be6', '\u0b80', '\u0c00'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   216
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   217
         * The Telugu range with the Telugu digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   218
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   219
        TELUGU          ('\u0c66', '\u0c00', '\u0c80'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   220
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   221
         * The Kannada range with the Kannada digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   222
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   223
        KANNADA         ('\u0ce6', '\u0c80', '\u0d00'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   224
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   225
         * The Malayalam range with the Malayalam digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   226
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   227
        MALAYALAM       ('\u0d66', '\u0d00', '\u0d80'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   228
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   229
         * The Thai range with the Thai digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   230
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   231
        THAI            ('\u0e50', '\u0e00', '\u0e80'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   232
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   233
         * The Lao range with the Lao digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   234
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   235
        LAO             ('\u0ed0', '\u0e80', '\u0f00'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   236
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   237
         * The Tibetan range with the Tibetan digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   238
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   239
        TIBETAN         ('\u0f20', '\u0f00', '\u1000'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   240
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   241
         * The Myanmar range with the Myanmar digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   242
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   243
        MYANMAR         ('\u1040', '\u1000', '\u1080'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   244
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   245
         * The Ethiopic range with the Ethiopic digits. Ethiopic
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   246
         * does not have a decimal digit 0 so Latin (European) 0 is
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   247
         * used.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   248
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   249
        ETHIOPIC        ('\u1369', '\u1200', '\u1380') {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   250
            @Override
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   251
            char getNumericBase() { return 1; }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   252
        },
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   253
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   254
         * The Khmer range with the Khmer digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   255
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   256
        KHMER           ('\u17e0', '\u1780', '\u1800'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   257
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   258
         * The Mongolian range with the Mongolian digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   259
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   260
        MONGOLIAN       ('\u1810', '\u1800', '\u1900'),
5281
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   261
        // The order of EUROPEAN to MOGOLIAN must be consistent
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   262
        // with the bitmask-based constants.
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   263
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   264
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   265
         * The N'Ko range with the N'Ko digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   266
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   267
        NKO             ('\u07c0', '\u07c0', '\u0800'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   268
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   269
         * The Myanmar range with the Myanmar Shan digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   270
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   271
        MYANMAR_SHAN    ('\u1090', '\u1000', '\u10a0'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   272
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   273
         * The Limbu range with the Limbu digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   274
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   275
        LIMBU           ('\u1946', '\u1900', '\u1950'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   276
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   277
         * The New Tai Lue range with the New Tai Lue digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   278
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   279
        NEW_TAI_LUE     ('\u19d0', '\u1980', '\u19e0'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   280
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   281
         * The Balinese range with the Balinese digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   282
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   283
        BALINESE        ('\u1b50', '\u1b00', '\u1b80'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   284
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   285
         * The Sundanese range with the Sundanese digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   286
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   287
        SUNDANESE       ('\u1bb0', '\u1b80', '\u1bc0'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   288
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   289
         * The Lepcha range with the Lepcha digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   290
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   291
        LEPCHA          ('\u1c40', '\u1c00', '\u1c50'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   292
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   293
         * The Ol Chiki range with the Ol Chiki digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   294
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   295
        OL_CHIKI        ('\u1c50', '\u1c50', '\u1c80'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   296
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   297
         * The Vai range with the Vai digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   298
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   299
        VAI             ('\ua620', '\ua500', '\ua640'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   300
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   301
         * The Saurashtra range with the Saurashtra digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   302
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   303
        SAURASHTRA      ('\ua8d0', '\ua880', '\ua8e0'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   304
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   305
         * The Kayah Li range with the Kayah Li digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   306
         */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   307
        KAYAH_LI        ('\ua900', '\ua900', '\ua930'),
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   308
        /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   309
         * The Cham range with the Cham digits.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   310
         */
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   311
        CHAM            ('\uaa50', '\uaa00', '\uaa60'),
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   312
        /**
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   313
         * The Tai Tham Hora range with the Tai Tham Hora digits.
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   314
         */
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   315
        TAI_THAM_HORA   ('\u1a80', '\u1a20', '\u1ab0'),
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   316
        /**
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   317
         * The Tai Tham Tham range with the Tai Tham Tham digits.
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   318
         */
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   319
        TAI_THAM_THAM   ('\u1a90', '\u1a20', '\u1ab0'),
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   320
        /**
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   321
         * The Javanese range with the Javanese digits.
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   322
         */
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   323
        JAVANESE        ('\ua9d0', '\ua980', '\ua9e0'),
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   324
        /**
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   325
         * The Meetei Mayek range with the Meetei Mayek digits.
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   326
         */
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   327
        MEETEI_MAYEK    ('\uabf0', '\uabc0', '\uac00'),
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   328
        /**
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   329
         * The Sinhala range with the Sinhala digits.
35302
e4d2275861c3 8136494: Update "@since 1.9" to "@since 9" to match java.version.specification
iris
parents: 33242
diff changeset
   330
         * @since 9
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   331
         */
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   332
        SINHALA         ('\u0de6', '\u0d80', '\u0e00'),
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   333
        /**
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   334
         * The Myanmar Extended-B range with the Myanmar Tai Laing digits.
35302
e4d2275861c3 8136494: Update "@since 1.9" to "@since 9" to match java.version.specification
iris
parents: 33242
diff changeset
   335
         * @since 9
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   336
         */
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   337
        MYANMAR_TAI_LAING ('\ua9f0', '\ua9e0', '\uaa00');
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   338
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   339
        private static int toRangeIndex(Range script) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   340
            int index = script.ordinal();
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   341
            return index < NUM_KEYS ? index : -1;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   342
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   343
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   344
        private static Range indexToRange(int index) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   345
            return index < NUM_KEYS ? Range.values()[index] : null;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   346
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   347
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   348
        private static int toRangeMask(Set<Range> ranges) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   349
            int m = 0;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   350
            for (Range range : ranges) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   351
                int index = range.ordinal();
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   352
                if (index < NUM_KEYS) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   353
                    m |= 1 << index;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   354
                }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   355
            }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   356
            return m;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   357
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   358
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   359
        private static Set<Range> maskToRangeSet(int mask) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   360
            Set<Range> set = EnumSet.noneOf(Range.class);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   361
            Range[] a = Range.values();
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   362
            for (int i = 0; i < NUM_KEYS; i++) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   363
                if ((mask & (1 << i)) != 0) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   364
                    set.add(a[i]);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   365
                }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   366
            }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   367
            return set;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   368
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   369
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   370
        // base character of range digits
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   371
        private final int base;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   372
        // Unicode range
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   373
        private final int start, // inclusive
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   374
                          end;   // exclusive
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   375
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   376
        private Range(int base, int start, int end) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   377
            this.base = base - ('0' + getNumericBase());
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   378
            this.start = start;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   379
            this.end = end;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   380
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   381
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   382
        private int getDigitBase() {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   383
            return base;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   384
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   385
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   386
        char getNumericBase() {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   387
            return 0;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   388
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   389
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   390
        private boolean inRange(int c) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   391
            return start <= c && c < end;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   392
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   393
    }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   394
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
    /** index of context for contextual shaping - values range from 0 to 18 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
    private int key;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
    /** flag indicating whether to shape contextually (high bit) and which
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
     *  digit ranges to shape (bits 0-18)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
    private int mask;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   403
    /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   404
     * The context {@code Range} for contextual shaping or the {@code
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   405
     * Range} for non-contextual shaping. {@code null} for the bit
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   406
     * mask-based API.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   407
     *
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   408
     * @since 1.7
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   409
     */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   410
    private Range shapingRange;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   411
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   412
    /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   413
     * {@code Set<Range>} indicating which Unicode ranges to
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   414
     * shape. {@code null} for the bit mask-based API.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   415
     */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   416
    private transient Set<Range> rangeSet;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   417
5281
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   418
    /**
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   419
     * rangeSet.toArray() value. Sorted by Range.base when the number
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
   420
     * of elements is greater than BSEARCH_THRESHOLD.
5281
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   421
     */
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   422
    private transient Range[] rangeArray;
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   423
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   424
    /**
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   425
     * If more than BSEARCH_THRESHOLD ranges are specified, binary search is used.
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   426
     */
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   427
    private static final int BSEARCH_THRESHOLD = 3;
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   428
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   429
    private static final long serialVersionUID = -8022764705923730308L;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   430
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   431
    /** Identifies the Latin-1 (European) and extended range, and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   432
     *  Latin-1 (European) decimal base.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
    public static final int EUROPEAN = 1<<0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
    /** Identifies the ARABIC range and decimal base. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
    public static final int ARABIC = 1<<1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
    /** Identifies the ARABIC range and ARABIC_EXTENDED decimal base. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
    public static final int EASTERN_ARABIC = 1<<2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
    /** Identifies the DEVANAGARI range and decimal base. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
    public static final int DEVANAGARI = 1<<3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
    /** Identifies the BENGALI range and decimal base. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
    public static final int BENGALI = 1<<4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
    /** Identifies the GURMUKHI range and decimal base. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
    public static final int GURMUKHI = 1<<5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
    /** Identifies the GUJARATI range and decimal base. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
    public static final int GUJARATI = 1<<6;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
    /** Identifies the ORIYA range and decimal base. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
    public static final int ORIYA = 1<<7;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   457
    /** Identifies the TAMIL range and decimal base. */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   458
    // TAMIL DIGIT ZERO was added in Unicode 4.1
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
    public static final int TAMIL = 1<<8;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
    /** Identifies the TELUGU range and decimal base. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
    public static final int TELUGU = 1<<9;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
    /** Identifies the KANNADA range and decimal base. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
    public static final int KANNADA = 1<<10;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
    /** Identifies the MALAYALAM range and decimal base. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
    public static final int MALAYALAM = 1<<11;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
    /** Identifies the THAI range and decimal base. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
    public static final int THAI = 1<<12;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
    /** Identifies the LAO range and decimal base. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
    public static final int LAO = 1<<13;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
    /** Identifies the TIBETAN range and decimal base. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
    public static final int TIBETAN = 1<<14;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
    /** Identifies the MYANMAR range and decimal base. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
    public static final int MYANMAR = 1<<15;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
    /** Identifies the ETHIOPIC range and decimal base. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
    public static final int ETHIOPIC = 1<<16;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
    /** Identifies the KHMER range and decimal base. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
    public static final int KHMER = 1<<17;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
    /** Identifies the MONGOLIAN range and decimal base. */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
    public static final int MONGOLIAN = 1<<18;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   491
    /** Identifies all ranges, for full contextual shaping.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   492
     *
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   493
     * <p>This constant specifies all of the bit mask-based
26749
b6598aa90114 8055326: Fix typos in client-related packages
serb
parents: 25859
diff changeset
   494
     * ranges. Use {@code EnumSet.allOf(NumericShaper.Range.class)} to
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   495
     * specify all of the enum-based ranges.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   496
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
    public static final int ALL_RANGES = 0x0007ffff;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
    private static final int EUROPEAN_KEY = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
    private static final int ARABIC_KEY = 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
    private static final int EASTERN_ARABIC_KEY = 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
    private static final int DEVANAGARI_KEY = 3;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
    private static final int BENGALI_KEY = 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
    private static final int GURMUKHI_KEY = 5;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
    private static final int GUJARATI_KEY = 6;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
    private static final int ORIYA_KEY = 7;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
    private static final int TAMIL_KEY = 8;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
    private static final int TELUGU_KEY = 9;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
    private static final int KANNADA_KEY = 10;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
    private static final int MALAYALAM_KEY = 11;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
    private static final int THAI_KEY = 12;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
    private static final int LAO_KEY = 13;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
    private static final int TIBETAN_KEY = 14;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
    private static final int MYANMAR_KEY = 15;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
    private static final int ETHIOPIC_KEY = 16;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
    private static final int KHMER_KEY = 17;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
    private static final int MONGOLIAN_KEY = 18;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   519
    private static final int NUM_KEYS = MONGOLIAN_KEY + 1; // fixed
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
    private static final int CONTEXTUAL_MASK = 1<<31;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
    private static final char[] bases = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
        '\u0030' - '\u0030', // EUROPEAN
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   525
        '\u0660' - '\u0030', // ARABIC-INDIC
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   526
        '\u06f0' - '\u0030', // EXTENDED ARABIC-INDIC (EASTERN_ARABIC)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
        '\u0966' - '\u0030', // DEVANAGARI
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
        '\u09e6' - '\u0030', // BENGALI
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
        '\u0a66' - '\u0030', // GURMUKHI
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
        '\u0ae6' - '\u0030', // GUJARATI
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
        '\u0b66' - '\u0030', // ORIYA
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   532
        '\u0be6' - '\u0030', // TAMIL - zero was added in Unicode 4.1
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
        '\u0c66' - '\u0030', // TELUGU
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
        '\u0ce6' - '\u0030', // KANNADA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
        '\u0d66' - '\u0030', // MALAYALAM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
        '\u0e50' - '\u0030', // THAI
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
        '\u0ed0' - '\u0030', // LAO
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
        '\u0f20' - '\u0030', // TIBETAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
        '\u1040' - '\u0030', // MYANMAR
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   540
        '\u1369' - '\u0031', // ETHIOPIC - no zero
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
        '\u17e0' - '\u0030', // KHMER
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
        '\u1810' - '\u0030', // MONGOLIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
    // some ranges adjoin or overlap, rethink if we want to do a binary search on this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
    private static final char[] contexts = {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
        '\u0000', '\u0300', // 'EUROPEAN' (really latin-1 and extended)
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   549
        '\u0600', '\u0780', // ARABIC
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   550
        '\u0600', '\u0780', // EASTERN_ARABIC -- note overlap with arabic
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
        '\u0900', '\u0980', // DEVANAGARI
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
        '\u0980', '\u0a00', // BENGALI
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
        '\u0a00', '\u0a80', // GURMUKHI
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
        '\u0a80', '\u0b00', // GUJARATI
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
        '\u0b00', '\u0b80', // ORIYA
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   556
        '\u0b80', '\u0c00', // TAMIL
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
        '\u0c00', '\u0c80', // TELUGU
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
        '\u0c80', '\u0d00', // KANNADA
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
        '\u0d00', '\u0d80', // MALAYALAM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
        '\u0e00', '\u0e80', // THAI
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
        '\u0e80', '\u0f00', // LAO
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
        '\u0f00', '\u1000', // TIBETAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
        '\u1000', '\u1080', // MYANMAR
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   564
        '\u1200', '\u1380', // ETHIOPIC - note missing zero
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
        '\u1780', '\u1800', // KHMER
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
        '\u1800', '\u1900', // MONGOLIAN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
        '\uffff',
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
    // assume most characters are near each other so probing the cache is infrequent,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
    // and a linear probe is ok.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
    private static int ctCache = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
    private static int ctCacheLimit = contexts.length - 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
    // warning, synchronize access to this as it modifies state
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
    private static int getContextKey(char c) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
        if (c < contexts[ctCache]) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
            while (ctCache > 0 && c < contexts[ctCache]) --ctCache;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
        } else if (c >= contexts[ctCache + 1]) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
            while (ctCache < ctCacheLimit && c >= contexts[ctCache + 1]) ++ctCache;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
        // if we're not in a known range, then return EUROPEAN as the range key
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
        return (ctCache & 0x1) == 0 ? (ctCache / 2) : EUROPEAN_KEY;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   588
    // cache for the NumericShaper.Range version
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   589
    private transient volatile Range currentRange = Range.EUROPEAN;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   590
5281
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   591
    private Range rangeForCodePoint(final int codepoint) {
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   592
        if (currentRange.inRange(codepoint)) {
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   593
            return currentRange;
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   594
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   595
5281
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   596
        final Range[] ranges = rangeArray;
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   597
        if (ranges.length > BSEARCH_THRESHOLD) {
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   598
            int lo = 0;
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   599
            int hi = ranges.length - 1;
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   600
            while (lo <= hi) {
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   601
                int mid = (lo + hi) / 2;
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   602
                Range range = ranges[mid];
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   603
                if (codepoint < range.start) {
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   604
                    hi = mid - 1;
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   605
                } else if (codepoint >= range.end) {
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   606
                    lo = mid + 1;
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   607
                } else {
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   608
                    currentRange = range;
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   609
                    return range;
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   610
                }
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   611
            }
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   612
        } else {
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   613
            for (int i = 0; i < ranges.length; i++) {
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   614
                if (ranges[i].inRange(codepoint)) {
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   615
                    return ranges[i];
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
   616
                }
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   617
            }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   618
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   619
        return Range.EUROPEAN;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   620
    }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   621
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
     * A range table of strong directional characters (types L, R, AL).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
     * Even (left) indexes are starts of ranges of non-strong-directional (or undefined)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
     * characters, odd (right) indexes are starts of ranges of strong directional
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
     * characters.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
     */
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   628
    private static int[] strongTable = {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   629
        0x0000, 0x0041,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   630
        0x005b, 0x0061,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   631
        0x007b, 0x00aa,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   632
        0x00ab, 0x00b5,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   633
        0x00b6, 0x00ba,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   634
        0x00bb, 0x00c0,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   635
        0x00d7, 0x00d8,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   636
        0x00f7, 0x00f8,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   637
        0x02b9, 0x02bb,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   638
        0x02c2, 0x02d0,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   639
        0x02d2, 0x02e0,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   640
        0x02e5, 0x02ee,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   641
        0x02ef, 0x0370,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   642
        0x0374, 0x0376,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   643
        0x0378, 0x037a,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   644
        0x037e, 0x037f,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   645
        0x0380, 0x0386,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   646
        0x0387, 0x0388,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   647
        0x038b, 0x038c,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   648
        0x038d, 0x038e,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   649
        0x03a2, 0x03a3,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   650
        0x03f6, 0x03f7,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   651
        0x0483, 0x048a,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   652
        0x0530, 0x0531,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   653
        0x0557, 0x0559,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   654
        0x058a, 0x0590,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   655
        0x0591, 0x05be,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   656
        0x05bf, 0x05c0,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   657
        0x05c1, 0x05c3,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   658
        0x05c4, 0x05c6,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   659
        0x05c7, 0x05c8,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   660
        0x0600, 0x0608,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   661
        0x0609, 0x060b,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   662
        0x060c, 0x060d,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   663
        0x060e, 0x061b,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   664
        0x064b, 0x066d,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   665
        0x0670, 0x0671,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   666
        0x06d6, 0x06e5,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   667
        0x06e7, 0x06ee,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   668
        0x06f0, 0x06fa,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   669
        0x0711, 0x0712,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   670
        0x0730, 0x074b,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   671
        0x07a6, 0x07b1,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   672
        0x07eb, 0x07f4,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   673
        0x07f6, 0x07fa,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
   674
        0x07fd, 0x07fe,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   675
        0x0816, 0x081a,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   676
        0x081b, 0x0824,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   677
        0x0825, 0x0828,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   678
        0x0829, 0x082e,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   679
        0x0859, 0x085c,
33242
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
   680
        0x08e3, 0x0903,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   681
        0x093a, 0x093b,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   682
        0x093c, 0x093d,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   683
        0x0941, 0x0949,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   684
        0x094d, 0x094e,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   685
        0x0951, 0x0958,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   686
        0x0962, 0x0964,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   687
        0x0981, 0x0982,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   688
        0x0984, 0x0985,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   689
        0x098d, 0x098f,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   690
        0x0991, 0x0993,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   691
        0x09a9, 0x09aa,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   692
        0x09b1, 0x09b2,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   693
        0x09b3, 0x09b6,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   694
        0x09ba, 0x09bd,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   695
        0x09c1, 0x09c7,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   696
        0x09c9, 0x09cb,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   697
        0x09cd, 0x09ce,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   698
        0x09cf, 0x09d7,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   699
        0x09d8, 0x09dc,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   700
        0x09de, 0x09df,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   701
        0x09e2, 0x09e6,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   702
        0x09f2, 0x09f4,
50045
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
   703
        0x09fb, 0x09fc,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
   704
        0x09fe, 0x0a03,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   705
        0x0a04, 0x0a05,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   706
        0x0a0b, 0x0a0f,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   707
        0x0a11, 0x0a13,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   708
        0x0a29, 0x0a2a,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   709
        0x0a31, 0x0a32,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   710
        0x0a34, 0x0a35,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   711
        0x0a37, 0x0a38,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   712
        0x0a3a, 0x0a3e,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   713
        0x0a41, 0x0a59,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   714
        0x0a5d, 0x0a5e,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   715
        0x0a5f, 0x0a66,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   716
        0x0a70, 0x0a72,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
   717
        0x0a75, 0x0a76,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
   718
        0x0a73, 0x0a83,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   719
        0x0a84, 0x0a85,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   720
        0x0a8e, 0x0a8f,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   721
        0x0a92, 0x0a93,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   722
        0x0aa9, 0x0aaa,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   723
        0x0ab1, 0x0ab2,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   724
        0x0ab4, 0x0ab5,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   725
        0x0aba, 0x0abd,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   726
        0x0ac1, 0x0ac9,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   727
        0x0aca, 0x0acb,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   728
        0x0acd, 0x0ad0,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   729
        0x0ad1, 0x0ae0,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   730
        0x0ae2, 0x0ae6,
33242
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
   731
        0x0af1, 0x0af9,
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
   732
        0x0afa, 0x0b02,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   733
        0x0b04, 0x0b05,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   734
        0x0b0d, 0x0b0f,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   735
        0x0b11, 0x0b13,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   736
        0x0b29, 0x0b2a,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   737
        0x0b31, 0x0b32,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   738
        0x0b34, 0x0b35,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   739
        0x0b3a, 0x0b3d,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   740
        0x0b3f, 0x0b40,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   741
        0x0b41, 0x0b47,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   742
        0x0b49, 0x0b4b,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   743
        0x0b4d, 0x0b57,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   744
        0x0b58, 0x0b5c,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   745
        0x0b5e, 0x0b5f,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   746
        0x0b62, 0x0b66,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   747
        0x0b78, 0x0b83,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   748
        0x0b84, 0x0b85,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   749
        0x0b8b, 0x0b8e,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   750
        0x0b91, 0x0b92,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   751
        0x0b96, 0x0b99,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   752
        0x0b9b, 0x0b9c,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   753
        0x0b9d, 0x0b9e,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   754
        0x0ba0, 0x0ba3,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   755
        0x0ba5, 0x0ba8,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   756
        0x0bab, 0x0bae,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   757
        0x0bba, 0x0bbe,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   758
        0x0bc0, 0x0bc1,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   759
        0x0bc3, 0x0bc6,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   760
        0x0bc9, 0x0bca,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   761
        0x0bcd, 0x0bd0,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   762
        0x0bd1, 0x0bd7,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   763
        0x0bd8, 0x0be6,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   764
        0x0bf3, 0x0c01,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   765
        0x0c04, 0x0c05,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   766
        0x0c0d, 0x0c0e,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   767
        0x0c11, 0x0c12,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   768
        0x0c29, 0x0c2a,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   769
        0x0c3a, 0x0c3d,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   770
        0x0c3e, 0x0c41,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   771
        0x0c45, 0x0c58,
33242
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
   772
        0x0c5b, 0x0c60,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   773
        0x0c62, 0x0c66,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   774
        0x0c70, 0x0c7f,
50045
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
   775
        0x0c81, 0x0c82,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   776
        0x0c8d, 0x0c8e,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   777
        0x0c91, 0x0c92,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   778
        0x0ca9, 0x0caa,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   779
        0x0cb4, 0x0cb5,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   780
        0x0cba, 0x0cbd,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   781
        0x0cc5, 0x0cc6,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   782
        0x0cc9, 0x0cca,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   783
        0x0ccc, 0x0cd5,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   784
        0x0cd7, 0x0cde,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   785
        0x0cdf, 0x0ce0,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   786
        0x0ce2, 0x0ce6,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   787
        0x0cf0, 0x0cf1,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   788
        0x0cf3, 0x0d02,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   789
        0x0d04, 0x0d05,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   790
        0x0d0d, 0x0d0e,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   791
        0x0d11, 0x0d12,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   792
        0x0d3b, 0x0d3d,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   793
        0x0d41, 0x0d46,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   794
        0x0d49, 0x0d4a,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   795
        0x0d4d, 0x0d4e,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   796
        0x0d62, 0x0d66,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   797
        0x0d80, 0x0d82,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   798
        0x0d84, 0x0d85,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   799
        0x0d97, 0x0d9a,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   800
        0x0db2, 0x0db3,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   801
        0x0dbc, 0x0dbd,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   802
        0x0dbe, 0x0dc0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   803
        0x0dc7, 0x0dcf,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   804
        0x0dd2, 0x0dd8,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   805
        0x0de0, 0x0de6,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   806
        0x0df0, 0x0df2,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   807
        0x0df5, 0x0e01,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   808
        0x0e31, 0x0e32,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   809
        0x0e34, 0x0e40,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   810
        0x0e47, 0x0e4f,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   811
        0x0e5c, 0x0e81,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   812
        0x0e83, 0x0e84,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   813
        0x0e85, 0x0e87,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   814
        0x0e89, 0x0e8a,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   815
        0x0e8b, 0x0e8d,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   816
        0x0e8e, 0x0e94,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   817
        0x0e98, 0x0e99,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   818
        0x0ea0, 0x0ea1,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   819
        0x0ea4, 0x0ea5,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   820
        0x0ea6, 0x0ea7,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   821
        0x0ea8, 0x0eaa,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   822
        0x0eac, 0x0ead,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   823
        0x0eb1, 0x0eb2,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   824
        0x0eb4, 0x0ebd,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   825
        0x0ebe, 0x0ec0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   826
        0x0ec5, 0x0ec6,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   827
        0x0ec7, 0x0ed0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   828
        0x0eda, 0x0edc,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   829
        0x0ee0, 0x0f00,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   830
        0x0f18, 0x0f1a,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   831
        0x0f35, 0x0f36,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   832
        0x0f37, 0x0f38,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   833
        0x0f39, 0x0f3e,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   834
        0x0f48, 0x0f49,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   835
        0x0f6d, 0x0f7f,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   836
        0x0f80, 0x0f85,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   837
        0x0f86, 0x0f88,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   838
        0x0f8d, 0x0fbe,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   839
        0x0fc6, 0x0fc7,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   840
        0x0fcd, 0x0fce,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   841
        0x0fdb, 0x1000,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   842
        0x102d, 0x1031,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   843
        0x1032, 0x1038,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   844
        0x1039, 0x103b,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   845
        0x103d, 0x103f,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   846
        0x1058, 0x105a,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   847
        0x105e, 0x1061,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   848
        0x1071, 0x1075,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   849
        0x1082, 0x1083,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   850
        0x1085, 0x1087,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   851
        0x108d, 0x108e,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   852
        0x109d, 0x109e,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   853
        0x10c6, 0x10c7,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   854
        0x10c8, 0x10cd,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   855
        0x10ce, 0x10d0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   856
        0x1249, 0x124a,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   857
        0x124e, 0x1250,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   858
        0x1257, 0x1258,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   859
        0x1259, 0x125a,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   860
        0x125e, 0x1260,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   861
        0x1289, 0x128a,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   862
        0x128e, 0x1290,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   863
        0x12b1, 0x12b2,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   864
        0x12b6, 0x12b8,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   865
        0x12bf, 0x12c0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   866
        0x12c1, 0x12c2,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   867
        0x12c6, 0x12c8,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   868
        0x12d7, 0x12d8,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   869
        0x1311, 0x1312,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   870
        0x1316, 0x1318,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   871
        0x135b, 0x1360,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   872
        0x137d, 0x1380,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   873
        0x1390, 0x13a0,
33242
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
   874
        0x13f6, 0x13f8,
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
   875
        0x13fe, 0x1401,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   876
        0x1680, 0x1681,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   877
        0x169b, 0x16a0,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   878
        0x16f9, 0x1700,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   879
        0x170d, 0x170e,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   880
        0x1712, 0x1720,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   881
        0x1732, 0x1735,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   882
        0x1737, 0x1740,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   883
        0x1752, 0x1760,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   884
        0x176d, 0x176e,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   885
        0x1771, 0x1780,
12300
c795ca195227 7070436: Support Unicode 6.1.0 in JDK 8
peytoia
parents: 7781
diff changeset
   886
        0x17b4, 0x17b6,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   887
        0x17b7, 0x17be,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   888
        0x17c6, 0x17c7,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   889
        0x17c9, 0x17d4,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   890
        0x17db, 0x17dc,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   891
        0x17dd, 0x17e0,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   892
        0x17ea, 0x1810,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   893
        0x181a, 0x1820,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
   894
        0x1879, 0x1884,
50045
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
   895
        0x1885, 0x1887,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   896
        0x18a9, 0x18aa,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   897
        0x18ab, 0x18b0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   898
        0x18f6, 0x1900,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   899
        0x191f, 0x1923,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   900
        0x1927, 0x1929,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   901
        0x192c, 0x1930,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   902
        0x1932, 0x1933,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   903
        0x1939, 0x1946,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   904
        0x196e, 0x1970,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   905
        0x1975, 0x1980,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   906
        0x19ac, 0x19b0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   907
        0x19ca, 0x19d0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   908
        0x19db, 0x1a00,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   909
        0x1a17, 0x1a19,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   910
        0x1a1b, 0x1a1e,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   911
        0x1a56, 0x1a57,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   912
        0x1a58, 0x1a61,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   913
        0x1a62, 0x1a63,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   914
        0x1a65, 0x1a6d,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   915
        0x1a73, 0x1a80,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   916
        0x1a8a, 0x1a90,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   917
        0x1a9a, 0x1aa0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   918
        0x1aae, 0x1b04,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   919
        0x1b34, 0x1b35,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   920
        0x1b36, 0x1b3b,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   921
        0x1b3c, 0x1b3d,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   922
        0x1b42, 0x1b43,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   923
        0x1b4c, 0x1b50,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   924
        0x1b6b, 0x1b74,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   925
        0x1b7d, 0x1b82,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   926
        0x1ba2, 0x1ba6,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   927
        0x1ba8, 0x1baa,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   928
        0x1bab, 0x1bae,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   929
        0x1be6, 0x1be7,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   930
        0x1be8, 0x1bea,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   931
        0x1bed, 0x1bee,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   932
        0x1bef, 0x1bf2,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   933
        0x1bf4, 0x1bfc,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   934
        0x1c2c, 0x1c34,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   935
        0x1c36, 0x1c3b,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   936
        0x1c4a, 0x1c4d,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
   937
        0x1c89, 0x1c90,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
   938
        0x1cbb, 0x1cbd,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   939
        0x1cc8, 0x1cd3,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   940
        0x1cd4, 0x1ce1,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   941
        0x1ce2, 0x1ce9,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   942
        0x1ced, 0x1cee,
12300
c795ca195227 7070436: Support Unicode 6.1.0 in JDK 8
peytoia
parents: 7781
diff changeset
   943
        0x1cf4, 0x1cf5,
50045
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
   944
        0x1cf8, 0x1d00,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   945
        0x1dc0, 0x1e00,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   946
        0x1f16, 0x1f18,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   947
        0x1f1e, 0x1f20,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   948
        0x1f46, 0x1f48,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   949
        0x1f4e, 0x1f50,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   950
        0x1f58, 0x1f59,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   951
        0x1f5a, 0x1f5b,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   952
        0x1f5c, 0x1f5d,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   953
        0x1f5e, 0x1f5f,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   954
        0x1f7e, 0x1f80,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   955
        0x1fb5, 0x1fb6,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   956
        0x1fbd, 0x1fbe,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   957
        0x1fbf, 0x1fc2,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   958
        0x1fc5, 0x1fc6,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   959
        0x1fcd, 0x1fd0,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   960
        0x1fd4, 0x1fd6,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   961
        0x1fdc, 0x1fe0,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   962
        0x1fed, 0x1ff2,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   963
        0x1ff5, 0x1ff6,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   964
        0x1ffd, 0x200e,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   965
        0x2010, 0x2071,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   966
        0x2072, 0x207f,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   967
        0x2080, 0x2090,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   968
        0x209d, 0x2102,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   969
        0x2103, 0x2107,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   970
        0x2108, 0x210a,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   971
        0x2114, 0x2115,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   972
        0x2116, 0x2119,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   973
        0x211e, 0x2124,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   974
        0x2125, 0x2126,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   975
        0x2127, 0x2128,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   976
        0x2129, 0x212a,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   977
        0x212e, 0x212f,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   978
        0x213a, 0x213c,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   979
        0x2140, 0x2145,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   980
        0x214a, 0x214e,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   981
        0x2150, 0x2160,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   982
        0x2189, 0x2336,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   983
        0x237b, 0x2395,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   984
        0x2396, 0x249c,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   985
        0x24ea, 0x26ac,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   986
        0x26ad, 0x2800,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
   987
        0x2900, 0x2c00,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   988
        0x2c2f, 0x2c30,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   989
        0x2c5f, 0x2c60,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
   990
        0x2ce5, 0x2ceb,
12300
c795ca195227 7070436: Support Unicode 6.1.0 in JDK 8
peytoia
parents: 7781
diff changeset
   991
        0x2cef, 0x2cf2,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   992
        0x2cf4, 0x2d00,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   993
        0x2d26, 0x2d27,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   994
        0x2d28, 0x2d2d,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   995
        0x2d2e, 0x2d30,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   996
        0x2d68, 0x2d6f,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   997
        0x2d71, 0x2d80,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   998
        0x2d97, 0x2da0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
   999
        0x2da7, 0x2da8,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1000
        0x2daf, 0x2db0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1001
        0x2db7, 0x2db8,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1002
        0x2dbf, 0x2dc0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1003
        0x2dc7, 0x2dc8,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1004
        0x2dcf, 0x2dd0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1005
        0x2dd7, 0x2dd8,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1006
        0x2ddf, 0x3005,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1007
        0x3008, 0x3021,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1008
        0x302a, 0x302e,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1009
        0x3030, 0x3031,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1010
        0x3036, 0x3038,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1011
        0x303d, 0x3041,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1012
        0x3097, 0x309d,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1013
        0x30a0, 0x30a1,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1014
        0x30fb, 0x30fc,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1015
        0x3100, 0x3105,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1016
        0x3130, 0x3131,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1017
        0x318f, 0x3190,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1018
        0x31bb, 0x31f0,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1019
        0x321d, 0x3220,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1020
        0x3250, 0x3260,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1021
        0x327c, 0x327f,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1022
        0x32b1, 0x32c0,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1023
        0x32cc, 0x32d0,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1024
        0x32ff, 0x3300,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1025
        0x3377, 0x337b,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1026
        0x33de, 0x33e0,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1027
        0x33ff, 0x3400,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1028
        0x4db6, 0x4e00,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1029
        0x9ff0, 0xa000,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1030
        0xa48d, 0xa4d0,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1031
        0xa60d, 0xa610,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1032
        0xa62c, 0xa640,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1033
        0xa66f, 0xa680,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1034
        0xa69e, 0xa6a0,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1035
        0xa6f0, 0xa6f2,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1036
        0xa6f8, 0xa722,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1037
        0xa788, 0xa789,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1038
        0xa7ba, 0xa7f7,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1039
        0xa802, 0xa803,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1040
        0xa806, 0xa807,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1041
        0xa80b, 0xa80c,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1042
        0xa825, 0xa827,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1043
        0xa828, 0xa830,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1044
        0xa838, 0xa840,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1045
        0xa874, 0xa880,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1046
        0xa8c4, 0xa8ce,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1047
        0xa8da, 0xa8f2,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1048
        0xa8ff, 0xa900,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1049
        0xa926, 0xa92e,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1050
        0xa947, 0xa952,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1051
        0xa954, 0xa95f,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1052
        0xa97d, 0xa983,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1053
        0xa9b3, 0xa9b4,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1054
        0xa9b6, 0xa9ba,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1055
        0xa9bc, 0xa9bd,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1056
        0xa9ce, 0xa9cf,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1057
        0xa9da, 0xa9de,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1058
        0xa9e5, 0xa9e6,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1059
        0xa9ff, 0xaa00,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1060
        0xaa29, 0xaa2f,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1061
        0xaa31, 0xaa33,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1062
        0xaa35, 0xaa40,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1063
        0xaa43, 0xaa44,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1064
        0xaa4c, 0xaa4d,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1065
        0xaa4e, 0xaa50,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1066
        0xaa5a, 0xaa5c,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1067
        0xaa7c, 0xaa7d,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1068
        0xaab0, 0xaab1,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1069
        0xaab2, 0xaab5,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1070
        0xaab7, 0xaab9,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1071
        0xaabe, 0xaac0,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1072
        0xaac1, 0xaac2,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1073
        0xaac3, 0xaadb,
12300
c795ca195227 7070436: Support Unicode 6.1.0 in JDK 8
peytoia
parents: 7781
diff changeset
  1074
        0xaaec, 0xaaee,
c795ca195227 7070436: Support Unicode 6.1.0 in JDK 8
peytoia
parents: 7781
diff changeset
  1075
        0xaaf6, 0xab01,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1076
        0xab07, 0xab09,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1077
        0xab0f, 0xab11,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1078
        0xab17, 0xab20,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1079
        0xab27, 0xab28,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1080
        0xab2f, 0xab30,
33242
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1081
        0xab66, 0xab70,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1082
        0xabe5, 0xabe6,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1083
        0xabe8, 0xabe9,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1084
        0xabed, 0xabf0,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1085
        0xabfa, 0xac00,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1086
        0xd7a4, 0xd7b0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1087
        0xd7c7, 0xd7cb,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1088
        0xd7fc, 0xe000,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1089
        0xfa6e, 0xfa70,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1090
        0xfada, 0xfb00,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1091
        0xfb07, 0xfb13,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1092
        0xfb18, 0xfb1d,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1093
        0xfb1e, 0xfb1f,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1094
        0xfb29, 0xfb2a,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1095
        0xfd3e, 0xfd40,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1096
        0xfdd0, 0xfdf0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1097
        0xfdfd, 0xfdfe,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1098
        0xfe00, 0xfe70,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1099
        0xfeff, 0xff21,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1100
        0xff3b, 0xff41,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1101
        0xff5b, 0xff66,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1102
        0xffbf, 0xffc2,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1103
        0xffc8, 0xffca,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1104
        0xffd0, 0xffd2,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1105
        0xffd8, 0xffda,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1106
        0xffdd, 0x10000,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1107
        0x1000c, 0x1000d,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1108
        0x10027, 0x10028,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1109
        0x1003b, 0x1003c,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1110
        0x1003e, 0x1003f,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1111
        0x1004e, 0x10050,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1112
        0x1005e, 0x10080,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1113
        0x100fb, 0x10100,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1114
        0x10101, 0x10102,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1115
        0x10103, 0x10107,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1116
        0x10134, 0x10137,
50045
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1117
        0x10140, 0x1018d,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1118
        0x1018f, 0x101d0,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1119
        0x101fd, 0x10280,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1120
        0x1029d, 0x102a0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1121
        0x102d1, 0x10300,
50045
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1122
        0x10324, 0x1032d,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1123
        0x1034b, 0x10350,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1124
        0x10376, 0x10380,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1125
        0x1039e, 0x1039f,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1126
        0x103c4, 0x103c8,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1127
        0x103d6, 0x10400,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1128
        0x1049e, 0x104a0,
50045
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1129
        0x104aa, 0x104d3,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1130
        0x104d4, 0x104d8,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1131
        0x104fc, 0x10500,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1132
        0x10528, 0x10530,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1133
        0x10564, 0x1056f,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1134
        0x10570, 0x10600,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1135
        0x10737, 0x10740,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1136
        0x10756, 0x10760,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1137
        0x10768, 0x10800,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1138
        0x1091f, 0x10920,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1139
        0x10a01, 0x10a04,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1140
        0x10a05, 0x10a07,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1141
        0x10a0c, 0x10a10,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1142
        0x10a38, 0x10a3b,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1143
        0x10a3f, 0x10a40,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1144
        0x10ae5, 0x10ae7,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1145
        0x10b39, 0x10b40,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1146
        0x10d00, 0x10d40,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1147
        0x10e60, 0x10e7f,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1148
        0x10f30, 0x10f70,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1149
        0x11001, 0x11002,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1150
        0x11038, 0x11047,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1151
        0x1104e, 0x11066,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1152
        0x11070, 0x11082,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1153
        0x110b3, 0x110b7,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1154
        0x110b9, 0x110bb,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1155
        0x110c2, 0x110cd,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1156
        0x110ce, 0x110d0,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1157
        0x110e9, 0x110f0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1158
        0x110fa, 0x11103,
12300
c795ca195227 7070436: Support Unicode 6.1.0 in JDK 8
peytoia
parents: 7781
diff changeset
  1159
        0x11127, 0x1112c,
c795ca195227 7070436: Support Unicode 6.1.0 in JDK 8
peytoia
parents: 7781
diff changeset
  1160
        0x1112d, 0x11136,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1161
        0x11147, 0x11150,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1162
        0x11173, 0x11174,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1163
        0x11177, 0x11182,
12300
c795ca195227 7070436: Support Unicode 6.1.0 in JDK 8
peytoia
parents: 7781
diff changeset
  1164
        0x111b6, 0x111bf,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1165
        0x111c9, 0x111cd,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1166
        0x111ce, 0x111d0,
33242
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1167
        0x111e0, 0x111e1,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1168
        0x111f5, 0x11200,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1169
        0x11212, 0x11213,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1170
        0x1122f, 0x11232,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1171
        0x11234, 0x11235,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1172
        0x11236, 0x11238,
33242
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1173
        0x1123e, 0x11280,
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1174
        0x11287, 0x11288,
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1175
        0x11289, 0x1128a,
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1176
        0x1128e, 0x1128f,
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1177
        0x1129e, 0x1129f,
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1178
        0x112aa, 0x112b0,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1179
        0x112df, 0x112e0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1180
        0x112e3, 0x112f0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1181
        0x112fa, 0x11302,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1182
        0x11304, 0x11305,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1183
        0x1130d, 0x1130f,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1184
        0x11311, 0x11313,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1185
        0x11329, 0x1132a,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1186
        0x11331, 0x11332,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1187
        0x11334, 0x11335,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1188
        0x1133a, 0x1133d,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1189
        0x11340, 0x11341,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1190
        0x11345, 0x11347,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1191
        0x11349, 0x1134b,
33242
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1192
        0x1134e, 0x11350,
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1193
        0x11351, 0x11357,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1194
        0x11358, 0x1135d,
50045
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1195
        0x11364, 0x11400,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1196
        0x11438, 0x11440,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1197
        0x11442, 0x11445,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1198
        0x11446, 0x11447,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1199
        0x1145a, 0x1145b,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1200
        0x1145c, 0x1145d,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1201
        0x1145e, 0x11480,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1202
        0x114b3, 0x114b9,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1203
        0x114ba, 0x114bb,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1204
        0x114bf, 0x114c1,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1205
        0x114c2, 0x114c4,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1206
        0x114c8, 0x114d0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1207
        0x114da, 0x11580,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1208
        0x115b2, 0x115b8,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1209
        0x115bc, 0x115be,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1210
        0x115bf, 0x115c1,
33242
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1211
        0x115dc, 0x11600,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1212
        0x11633, 0x1163b,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1213
        0x1163d, 0x1163e,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1214
        0x1163f, 0x11641,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1215
        0x11645, 0x11650,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1216
        0x1165a, 0x11680,
12300
c795ca195227 7070436: Support Unicode 6.1.0 in JDK 8
peytoia
parents: 7781
diff changeset
  1217
        0x116ab, 0x116ac,
c795ca195227 7070436: Support Unicode 6.1.0 in JDK 8
peytoia
parents: 7781
diff changeset
  1218
        0x116ad, 0x116ae,
c795ca195227 7070436: Support Unicode 6.1.0 in JDK 8
peytoia
parents: 7781
diff changeset
  1219
        0x116b0, 0x116b6,
c795ca195227 7070436: Support Unicode 6.1.0 in JDK 8
peytoia
parents: 7781
diff changeset
  1220
        0x116b7, 0x116c0,
33242
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1221
        0x116ca, 0x11700,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1222
        0x1171b, 0x11720,
33242
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1223
        0x11722, 0x11726,
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1224
        0x11727, 0x11730,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1225
        0x1182f, 0x11838,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1226
        0x11839, 0x1183b,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1227
        0x1183c, 0x118a0,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1228
        0x118f3, 0x118ff,
50045
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1229
        0x11900, 0x11a00,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1230
        0x11a01, 0x11a07,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1231
        0x11a09, 0x11a0b,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1232
        0x11a33, 0x11a3a,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1233
        0x11a3b, 0x11a3f,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1234
        0x11a47, 0x11a50,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1235
        0x11a51, 0x11a57,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1236
        0x11a59, 0x11a5c,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1237
        0x11a84, 0x11a86,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1238
        0x11a8a, 0x11a97,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1239
        0x11a98, 0x11a9a,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1240
        0x11aa3, 0x11ac0,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1241
        0x11af9, 0x11c00,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1242
        0x11c09, 0x11c0a,
50045
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1243
        0x11c30, 0x11c3e,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1244
        0x11c46, 0x11c50,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1245
        0x11c6d, 0x11c70,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1246
        0x11c90, 0x11ca9,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1247
        0x11caa, 0x11cb1,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1248
        0x11cb2, 0x11cb4,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1249
        0x11cb5, 0x11d00,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1250
        0x11d07, 0x11d08,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1251
        0x11d0a, 0x11d0b,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1252
        0x11d31, 0x11d46,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1253
        0x11d47, 0x11d50,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1254
        0x11d5a, 0x11d60,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1255
        0x11d66, 0x11d67,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1256
        0x11d69, 0x11d6a,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1257
        0x11d8f, 0x11d93,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1258
        0x11d95, 0x11d96,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1259
        0x11d97, 0x11d98,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1260
        0x11d99, 0x11da0,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1261
        0x11daa, 0x11ee0,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1262
        0x11ef3, 0x11ef5,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1263
        0x11ef9, 0x12000,
33242
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1264
        0x1239a, 0x12400,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1265
        0x1246f, 0x12470,
33242
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1266
        0x12475, 0x12480,
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1267
        0x12544, 0x13000,
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1268
        0x1342f, 0x14400,
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1269
        0x14647, 0x16800,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1270
        0x16a39, 0x16a40,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1271
        0x16a5f, 0x16a60,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1272
        0x16a6a, 0x16a6e,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1273
        0x16a70, 0x16ad0,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1274
        0x16aee, 0x16af5,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1275
        0x16af6, 0x16b00,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1276
        0x16b30, 0x16b37,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1277
        0x16b46, 0x16b50,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1278
        0x16b5a, 0x16b5b,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1279
        0x16b62, 0x16b63,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1280
        0x16b78, 0x16b7d,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1281
        0x16b90, 0x16e40,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1282
        0x16e9b, 0x16f00,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1283
        0x16f45, 0x16f50,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1284
        0x16f7f, 0x16f93,
50045
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1285
        0x16fa0, 0x16fe0,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1286
        0x16fe2, 0x17000,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1287
        0x187f2, 0x18800,
50045
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1288
        0x18af3, 0x1b000,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1289
        0x1b11f, 0x1b170,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1290
        0x1b2fc, 0x1bc00,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1291
        0x1bc6b, 0x1bc70,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1292
        0x1bc7d, 0x1bc80,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1293
        0x1bc89, 0x1bc90,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1294
        0x1bc9a, 0x1bc9c,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1295
        0x1bc9d, 0x1bc9f,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1296
        0x1bca0, 0x1d000,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1297
        0x1d0f6, 0x1d100,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1298
        0x1d127, 0x1d129,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1299
        0x1d167, 0x1d16a,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1300
        0x1d173, 0x1d183,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1301
        0x1d185, 0x1d18c,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1302
        0x1d1aa, 0x1d1ae,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1303
        0x1d1e9, 0x1d2e0,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1304
        0x1d2f4, 0x1d360,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1305
        0x1d379, 0x1d400,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1306
        0x1d455, 0x1d456,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1307
        0x1d49d, 0x1d49e,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1308
        0x1d4a0, 0x1d4a2,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1309
        0x1d4a3, 0x1d4a5,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1310
        0x1d4a7, 0x1d4a9,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1311
        0x1d4ad, 0x1d4ae,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1312
        0x1d4ba, 0x1d4bb,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1313
        0x1d4bc, 0x1d4bd,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1314
        0x1d4c4, 0x1d4c5,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1315
        0x1d506, 0x1d507,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1316
        0x1d50b, 0x1d50d,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1317
        0x1d515, 0x1d516,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1318
        0x1d51d, 0x1d51e,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1319
        0x1d53a, 0x1d53b,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1320
        0x1d53f, 0x1d540,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1321
        0x1d545, 0x1d546,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1322
        0x1d547, 0x1d54a,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1323
        0x1d551, 0x1d552,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1324
        0x1d6a6, 0x1d6a8,
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1325
        0x1d6db, 0x1d6dc,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1326
        0x1d715, 0x1d716,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1327
        0x1d74f, 0x1d750,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1328
        0x1d789, 0x1d78a,
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1329
        0x1d7c3, 0x1d7c4,
33242
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1330
        0x1d7cc, 0x1d800,
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1331
        0x1da00, 0x1da37,
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1332
        0x1da3b, 0x1da6d,
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1333
        0x1da75, 0x1da76,
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1334
        0x1da84, 0x1da85,
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1335
        0x1da8c, 0x1e800,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1336
        0x1e8d0, 0x1e8d7,
50045
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1337
        0x1e944, 0x1e94b,
52633
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1338
        0x1ec70, 0x1ecc0,
f94ac11610b3 8209923: Unicode 11.0.0.
rgoel
parents: 52427
diff changeset
  1339
        0x1ee00, 0x1ef00,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1340
        0x1f000, 0x1f110,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1341
        0x1f12f, 0x1f130,
12300
c795ca195227 7070436: Support Unicode 6.1.0 in JDK 8
peytoia
parents: 7781
diff changeset
  1342
        0x1f16a, 0x1f170,
50045
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1343
        0x1f1ad, 0x1f1e6,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1344
        0x1f203, 0x1f210,
50045
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1345
        0x1f23c, 0x1f240,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1346
        0x1f249, 0x1f250,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1347
        0x1f252, 0x20000,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1348
        0x2a6d7, 0x2a700,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1349
        0x2b735, 0x2b740,
33242
eafa1e90b0e1 8072600: Unicode 8 support
peytoia
parents: 32834
diff changeset
  1350
        0x2b81e, 0x2b820,
50045
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1351
        0x2cea2, 0x2ceb0,
d9d55f64d136 8191410: Unicode 10
rgoel
parents: 47498
diff changeset
  1352
        0x2ebe1, 0x2f800,
31680
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1353
        0x2fa1e, 0xf0000,
88c53c2293b4 8032446: Support Unicode 7.0.0 in JDK 9
peytoia
parents: 26749
diff changeset
  1354
        0xffffe, 0x100000,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1355
        0x10fffe, 0x10ffff // sentinel
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1356
    };
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1357
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1358
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1359
    // use a binary search with a cache
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1360
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1361
    private transient volatile int stCache = 0;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1362
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1363
    private boolean isStrongDirectional(char c) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1364
        int cachedIndex = stCache;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1365
        if (c < strongTable[cachedIndex]) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1366
            cachedIndex = search(c, strongTable, 0, cachedIndex);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1367
        } else if (c >= strongTable[cachedIndex + 1]) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1368
            cachedIndex = search(c, strongTable, cachedIndex + 1,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1369
                                 strongTable.length - cachedIndex - 1);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1370
        }
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1371
        boolean val = (cachedIndex & 0x1) == 1;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1372
        stCache = cachedIndex;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1373
        return val;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1374
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1375
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1376
    private static int getKeyFromMask(int mask) {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1377
        int key = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1378
        while (key < NUM_KEYS && ((mask & (1<<key)) == 0)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1379
            ++key;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1380
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1381
        if (key == NUM_KEYS || ((mask & ~(1<<key)) != 0)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1382
            throw new IllegalArgumentException("invalid shaper: " + Integer.toHexString(mask));
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1383
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1384
        return key;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1385
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1386
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1387
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1388
     * Returns a shaper for the provided unicode range.  All
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1389
     * Latin-1 (EUROPEAN) digits are converted
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1390
     * to the corresponding decimal unicode digits.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1391
     * @param singleRange the specified Unicode range
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1392
     * @return a non-contextual numeric shaper
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1393
     * @throws IllegalArgumentException if the range is not a single range
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1394
     */
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1395
    public static NumericShaper getShaper(int singleRange) {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1396
        int key = getKeyFromMask(singleRange);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1397
        return new NumericShaper(key, singleRange);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1398
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1399
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1400
    /**
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1401
     * Returns a shaper for the provided Unicode
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1402
     * range. All Latin-1 (EUROPEAN) digits are converted to the
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1403
     * corresponding decimal digits of the specified Unicode range.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1404
     *
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1405
     * @param singleRange the Unicode range given by a {@link
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1406
     *                    NumericShaper.Range} constant.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1407
     * @return a non-contextual {@code NumericShaper}.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1408
     * @throws NullPointerException if {@code singleRange} is {@code null}
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1409
     * @since 1.7
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1410
     */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1411
    public static NumericShaper getShaper(Range singleRange) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1412
        return new NumericShaper(singleRange, EnumSet.of(singleRange));
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1413
    }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1414
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1415
    /**
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1416
     * Returns a contextual shaper for the provided unicode range(s).
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1417
     * Latin-1 (EUROPEAN) digits are converted to the decimal digits
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1418
     * corresponding to the range of the preceding text, if the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1419
     * range is one of the provided ranges.  Multiple ranges are
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1420
     * represented by or-ing the values together, such as,
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1421
     * {@code NumericShaper.ARABIC | NumericShaper.THAI}.  The
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1422
     * shaper assumes EUROPEAN as the starting context, that is, if
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1423
     * EUROPEAN digits are encountered before any strong directional
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1424
     * text in the string, the context is presumed to be EUROPEAN, and
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1425
     * so the digits will not shape.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1426
     * @param ranges the specified Unicode ranges
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1427
     * @return a shaper for the specified ranges
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1428
     */
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1429
    public static NumericShaper getContextualShaper(int ranges) {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1430
        ranges |= CONTEXTUAL_MASK;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1431
        return new NumericShaper(EUROPEAN_KEY, ranges);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1432
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1433
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1434
    /**
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1435
     * Returns a contextual shaper for the provided Unicode
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1436
     * range(s). The Latin-1 (EUROPEAN) digits are converted to the
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1437
     * decimal digits corresponding to the range of the preceding
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1438
     * text, if the range is one of the provided ranges.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1439
     *
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1440
     * <p>The shaper assumes EUROPEAN as the starting context, that
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1441
     * is, if EUROPEAN digits are encountered before any strong
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1442
     * directional text in the string, the context is presumed to be
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1443
     * EUROPEAN, and so the digits will not shape.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1444
     *
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1445
     * @param ranges the specified Unicode ranges
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1446
     * @return a contextual shaper for the specified ranges
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1447
     * @throws NullPointerException if {@code ranges} is {@code null}.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1448
     * @since 1.7
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1449
     */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1450
    public static NumericShaper getContextualShaper(Set<Range> ranges) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1451
        NumericShaper shaper = new NumericShaper(Range.EUROPEAN, ranges);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1452
        shaper.mask = CONTEXTUAL_MASK;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1453
        return shaper;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1454
    }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1455
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1456
    /**
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1457
     * Returns a contextual shaper for the provided unicode range(s).
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1458
     * Latin-1 (EUROPEAN) digits will be converted to the decimal digits
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1459
     * corresponding to the range of the preceding text, if the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1460
     * range is one of the provided ranges.  Multiple ranges are
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1461
     * represented by or-ing the values together, for example,
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1462
     * {@code NumericShaper.ARABIC | NumericShaper.THAI}.  The
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1463
     * shaper uses defaultContext as the starting context.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1464
     * @param ranges the specified Unicode ranges
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1465
     * @param defaultContext the starting context, such as
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1466
     * {@code NumericShaper.EUROPEAN}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1467
     * @return a shaper for the specified Unicode ranges.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1468
     * @throws IllegalArgumentException if the specified
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1469
     * {@code defaultContext} is not a single valid range.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1470
     */
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1471
    public static NumericShaper getContextualShaper(int ranges, int defaultContext) {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1472
        int key = getKeyFromMask(defaultContext);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1473
        ranges |= CONTEXTUAL_MASK;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1474
        return new NumericShaper(key, ranges);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1475
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1476
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1477
    /**
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1478
     * Returns a contextual shaper for the provided Unicode range(s).
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1479
     * The Latin-1 (EUROPEAN) digits will be converted to the decimal
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1480
     * digits corresponding to the range of the preceding text, if the
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1481
     * range is one of the provided ranges. The shaper uses {@code
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1482
     * defaultContext} as the starting context.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1483
     *
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1484
     * @param ranges the specified Unicode ranges
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1485
     * @param defaultContext the starting context, such as
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1486
     *                       {@code NumericShaper.Range.EUROPEAN}
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1487
     * @return a contextual shaper for the specified Unicode ranges.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1488
     * @throws NullPointerException
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1489
     *         if {@code ranges} or {@code defaultContext} is {@code null}
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1490
     * @since 1.7
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1491
     */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1492
    public static NumericShaper getContextualShaper(Set<Range> ranges,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1493
                                                    Range defaultContext) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1494
        if (defaultContext == null) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1495
            throw new NullPointerException();
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1496
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1497
        NumericShaper shaper = new NumericShaper(defaultContext, ranges);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1498
        shaper.mask = CONTEXTUAL_MASK;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1499
        return shaper;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1500
    }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1501
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1502
    /**
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1503
     * Private constructor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1504
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1505
    private NumericShaper(int key, int mask) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1506
        this.key = key;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1507
        this.mask = mask;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1508
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1509
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1510
    private NumericShaper(Range defaultContext, Set<Range> ranges) {
5281
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1511
        shapingRange = defaultContext;
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1512
        rangeSet = EnumSet.copyOf(ranges); // throws NPE if ranges is null.
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1513
26749
b6598aa90114 8055326: Fix typos in client-related packages
serb
parents: 25859
diff changeset
  1514
        // Give precedence to EASTERN_ARABIC if both ARABIC and
5281
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1515
        // EASTERN_ARABIC are specified.
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1516
        if (rangeSet.contains(Range.EASTERN_ARABIC)
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1517
            && rangeSet.contains(Range.ARABIC)) {
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1518
            rangeSet.remove(Range.ARABIC);
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1519
        }
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1520
26749
b6598aa90114 8055326: Fix typos in client-related packages
serb
parents: 25859
diff changeset
  1521
        // As well as the above case, give precedence to TAI_THAM_THAM if both
7247
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1522
        // TAI_THAM_HORA and TAI_THAM_THAM are specified.
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1523
        if (rangeSet.contains(Range.TAI_THAM_THAM)
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1524
            && rangeSet.contains(Range.TAI_THAM_HORA)) {
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1525
            rangeSet.remove(Range.TAI_THAM_HORA);
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1526
        }
20bd166a1ad6 6959267: Support Unicode 6.0.0
peytoia
parents: 5506
diff changeset
  1527
5281
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1528
        rangeArray = rangeSet.toArray(new Range[rangeSet.size()]);
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1529
        if (rangeArray.length > BSEARCH_THRESHOLD) {
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1530
            // sort rangeArray for binary search
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1531
            Arrays.sort(rangeArray,
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1532
                        new Comparator<Range>() {
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1533
                            public int compare(Range s1, Range s2) {
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1534
                                return s1.base > s2.base ? 1 : s1.base == s2.base ? 0 : -1;
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1535
                            }
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1536
                        });
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1537
        }
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1538
    }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1539
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1540
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1541
     * Converts the digits in the text that occur between start and
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1542
     * start + count.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1543
     * @param text an array of characters to convert
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1544
     * @param start the index into {@code text} to start
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1545
     *        converting
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1546
     * @param count the number of characters in {@code text}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1547
     *        to convert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1548
     * @throws IndexOutOfBoundsException if start or start + count is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1549
     *        out of bounds
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1550
     * @throws NullPointerException if text is null
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1551
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1552
    public void shape(char[] text, int start, int count) {
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1553
        checkParams(text, start, count);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1554
        if (isContextual()) {
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1555
            if (rangeSet == null) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1556
                shapeContextually(text, start, count, key);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1557
            } else {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1558
                shapeContextually(text, start, count, shapingRange);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1559
            }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1560
        } else {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1561
            shapeNonContextually(text, start, count);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1562
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1563
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1564
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1565
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1566
     * Converts the digits in the text that occur between start and
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1567
     * start + count, using the provided context.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1568
     * Context is ignored if the shaper is not a contextual shaper.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1569
     * @param text an array of characters
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1570
     * @param start the index into {@code text} to start
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1571
     *        converting
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1572
     * @param count the number of characters in {@code text}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1573
     *        to convert
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1574
     * @param context the context to which to convert the
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1575
     *        characters, such as {@code NumericShaper.EUROPEAN}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1576
     * @throws IndexOutOfBoundsException if start or start + count is
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1577
     *        out of bounds
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1578
     * @throws NullPointerException if text is null
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1579
     * @throws IllegalArgumentException if this is a contextual shaper
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1580
     * and the specified {@code context} is not a single valid
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1581
     * range.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1582
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1583
    public void shape(char[] text, int start, int count, int context) {
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1584
        checkParams(text, start, count);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1585
        if (isContextual()) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1586
            int ctxKey = getKeyFromMask(context);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1587
            if (rangeSet == null) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1588
                shapeContextually(text, start, count, ctxKey);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1589
            } else {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1590
                shapeContextually(text, start, count, Range.values()[ctxKey]);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1591
            }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1592
        } else {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1593
            shapeNonContextually(text, start, count);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1594
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1595
    }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1596
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1597
    /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1598
     * Converts the digits in the text that occur between {@code
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1599
     * start} and {@code start + count}, using the provided {@code
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1600
     * context}. {@code Context} is ignored if the shaper is not a
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1601
     * contextual shaper.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1602
     *
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1603
     * @param text  a {@code char} array
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1604
     * @param start the index into {@code text} to start converting
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1605
     * @param count the number of {@code char}s in {@code text}
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1606
     *              to convert
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1607
     * @param context the context to which to convert the characters,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1608
     *                such as {@code NumericShaper.Range.EUROPEAN}
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1609
     * @throws IndexOutOfBoundsException
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1610
     *         if {@code start} or {@code start + count} is out of bounds
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1611
     * @throws NullPointerException
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1612
     *         if {@code text} or {@code context} is null
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1613
     * @since 1.7
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1614
     */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1615
    public void shape(char[] text, int start, int count, Range context) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1616
        checkParams(text, start, count);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1617
        if (context == null) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1618
            throw new NullPointerException("context is null");
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1619
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1620
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1621
        if (isContextual()) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1622
            if (rangeSet != null) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1623
                shapeContextually(text, start, count, context);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1624
            } else {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1625
                int key = Range.toRangeIndex(context);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1626
                if (key >= 0) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1627
                    shapeContextually(text, start, count, key);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1628
                } else {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1629
                    shapeContextually(text, start, count, shapingRange);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1630
                }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1631
            }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1632
        } else {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1633
            shapeNonContextually(text, start, count);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1634
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1635
    }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1636
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1637
    private void checkParams(char[] text, int start, int count) {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1638
        if (text == null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1639
            throw new NullPointerException("text is null");
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1640
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1641
        if ((start < 0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1642
            || (start > text.length)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1643
            || ((start + count) < 0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1644
            || ((start + count) > text.length)) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1645
            throw new IndexOutOfBoundsException(
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1646
                "bad start or count for text of length " + text.length);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1647
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1648
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1649
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1650
    /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1651
     * Returns a {@code boolean} indicating whether or not
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1652
     * this shaper shapes contextually.
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1653
     * @return {@code true} if this shaper is contextual;
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1654
     *         {@code false} otherwise.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1655
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1656
    public boolean isContextual() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1657
        return (mask & CONTEXTUAL_MASK) != 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1658
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1659
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1660
    /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1661
     * Returns an {@code int} that ORs together the values for
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1662
     * all the ranges that will be shaped.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1663
     * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1664
     * For example, to check if a shaper shapes to Arabic, you would use the
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1665
     * following:
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1666
     * <blockquote>
21777
c0a423e43b0d 8025235: [javadoc] fix some errors in 2D
yan
parents: 21244
diff changeset
  1667
     *   {@code if ((shaper.getRanges() & shaper.ARABIC) != 0) &#123; ... }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1668
     * </blockquote>
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1669
     *
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1670
     * <p>Note that this method supports only the bit mask-based
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1671
     * ranges. Call {@link #getRangeSet()} for the enum-based ranges.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1672
     *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1673
     * @return the values for all the ranges to be shaped.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1674
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1675
    public int getRanges() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1676
        return mask & ~CONTEXTUAL_MASK;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1677
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1678
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1679
    /**
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1680
     * Returns a {@code Set} representing all the Unicode ranges in
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1681
     * this {@code NumericShaper} that will be shaped.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1682
     *
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1683
     * @return all the Unicode ranges to be shaped.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1684
     * @since 1.7
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1685
     */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1686
    public Set<Range> getRangeSet() {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1687
        if (rangeSet != null) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1688
            return EnumSet.copyOf(rangeSet);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1689
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1690
        return Range.maskToRangeSet(mask);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1691
    }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1692
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1693
    /**
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1694
     * Perform non-contextual shaping.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1695
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1696
    private void shapeNonContextually(char[] text, int start, int count) {
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1697
        int base;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1698
        char minDigit = '0';
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1699
        if (shapingRange != null) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1700
            base = shapingRange.getDigitBase();
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1701
            minDigit += shapingRange.getNumericBase();
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1702
        } else {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1703
            base = bases[key];
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1704
            if (key == ETHIOPIC_KEY) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1705
                minDigit++; // Ethiopic doesn't use decimal zero
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1706
            }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1707
        }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1708
        for (int i = start, e = start + count; i < e; ++i) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1709
            char c = text[i];
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1710
            if (c >= minDigit && c <= '\u0039') {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1711
                text[i] = (char)(c + base);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1712
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1713
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1714
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1715
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1716
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1717
     * Perform contextual shaping.
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1718
     * Synchronized to protect caches used in getContextKey.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1719
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1720
    private synchronized void shapeContextually(char[] text, int start, int count, int ctxKey) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1721
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1722
        // if we don't support this context, then don't shape
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1723
        if ((mask & (1<<ctxKey)) == 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1724
            ctxKey = EUROPEAN_KEY;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1725
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1726
        int lastkey = ctxKey;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1727
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1728
        int base = bases[ctxKey];
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1729
        char minDigit = ctxKey == ETHIOPIC_KEY ? '1' : '0'; // Ethiopic doesn't use decimal zero
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1730
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1731
        synchronized (NumericShaper.class) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1732
            for (int i = start, e = start + count; i < e; ++i) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1733
                char c = text[i];
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1734
                if (c >= minDigit && c <= '\u0039') {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1735
                    text[i] = (char)(c + base);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1736
                }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1737
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1738
                if (isStrongDirectional(c)) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1739
                    int newkey = getContextKey(c);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1740
                    if (newkey != lastkey) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1741
                        lastkey = newkey;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1742
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1743
                        ctxKey = newkey;
5447
30d843beb284 6943963: NumericShaper with ARABIC doesn't shape digits correctly after calling another instance
peytoia
parents: 5281
diff changeset
  1744
                        if (((mask & EASTERN_ARABIC) != 0) &&
30d843beb284 6943963: NumericShaper with ARABIC doesn't shape digits correctly after calling another instance
peytoia
parents: 5281
diff changeset
  1745
                             (ctxKey == ARABIC_KEY ||
30d843beb284 6943963: NumericShaper with ARABIC doesn't shape digits correctly after calling another instance
peytoia
parents: 5281
diff changeset
  1746
                              ctxKey == EASTERN_ARABIC_KEY)) {
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1747
                            ctxKey = EASTERN_ARABIC_KEY;
5447
30d843beb284 6943963: NumericShaper with ARABIC doesn't shape digits correctly after calling another instance
peytoia
parents: 5281
diff changeset
  1748
                        } else if (((mask & ARABIC) != 0) &&
30d843beb284 6943963: NumericShaper with ARABIC doesn't shape digits correctly after calling another instance
peytoia
parents: 5281
diff changeset
  1749
                             (ctxKey == ARABIC_KEY ||
30d843beb284 6943963: NumericShaper with ARABIC doesn't shape digits correctly after calling another instance
peytoia
parents: 5281
diff changeset
  1750
                              ctxKey == EASTERN_ARABIC_KEY)) {
30d843beb284 6943963: NumericShaper with ARABIC doesn't shape digits correctly after calling another instance
peytoia
parents: 5281
diff changeset
  1751
                            ctxKey = ARABIC_KEY;
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1752
                        } else if ((mask & (1<<ctxKey)) == 0) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1753
                            ctxKey = EUROPEAN_KEY;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1754
                        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1755
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1756
                        base = bases[ctxKey];
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1757
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1758
                        minDigit = ctxKey == ETHIOPIC_KEY ? '1' : '0'; // Ethiopic doesn't use decimal zero
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1759
                    }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1760
                }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1761
            }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1762
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1763
    }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1764
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1765
    private void shapeContextually(char[] text, int start, int count, Range ctxKey) {
5281
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1766
        // if we don't support the specified context, then don't shape.
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1767
        if (ctxKey == null || !rangeSet.contains(ctxKey)) {
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1768
            ctxKey = Range.EUROPEAN;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1769
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1770
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1771
        Range lastKey = ctxKey;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1772
        int base = ctxKey.getDigitBase();
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1773
        char minDigit = (char)('0' + ctxKey.getNumericBase());
5281
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1774
        final int end = start + count;
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1775
        for (int i = start; i < end; ++i) {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1776
            char c = text[i];
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1777
            if (c >= minDigit && c <= '9') {
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1778
                text[i] = (char)(c + base);
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1779
                continue;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1780
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1781
            if (isStrongDirectional(c)) {
5281
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1782
                ctxKey = rangeForCodePoint(c);
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1783
                if (ctxKey != lastKey) {
fb279b232508 6941948: NumaricShaper.shape() doesn't work with NumericShaper.Range.EASTERN_ARABIC
okutsu
parents: 4280
diff changeset
  1784
                    lastKey = ctxKey;
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1785
                    base = ctxKey.getDigitBase();
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1786
                    minDigit = (char)('0' + ctxKey.getNumericBase());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1787
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1788
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1789
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1790
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1791
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1792
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1793
     * Returns a hash code for this shaper.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1794
     * @return this shaper's hash code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1795
     * @see java.lang.Object#hashCode
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1796
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1797
    public int hashCode() {
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1798
        int hash = mask;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1799
        if (rangeSet != null) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1800
            // Use the CONTEXTUAL_MASK bit only for the enum-based
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1801
            // NumericShaper. A deserialized NumericShaper might have
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1802
            // bit masks.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1803
            hash &= CONTEXTUAL_MASK;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1804
            hash ^= rangeSet.hashCode();
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1805
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1806
        return hash;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1807
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1808
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1809
    /**
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1810
     * Returns {@code true} if the specified object is an instance of
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1811
     * {@code NumericShaper} and shapes identically to this one,
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1812
     * regardless of the range representations, the bit mask or the
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1813
     * enum. For example, the following code produces {@code "true"}.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1814
     * <blockquote><pre>
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1815
     * NumericShaper ns1 = NumericShaper.getShaper(NumericShaper.ARABIC);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1816
     * NumericShaper ns2 = NumericShaper.getShaper(NumericShaper.Range.ARABIC);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1817
     * System.out.println(ns1.equals(ns2));
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1818
     * </pre></blockquote>
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1819
     *
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1820
     * @param o the specified object to compare to this
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1821
     *          {@code NumericShaper}
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1822
     * @return {@code true} if {@code o} is an instance
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1823
     *         of {@code NumericShaper} and shapes in the same way;
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1824
     *         {@code false} otherwise.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1825
     * @see java.lang.Object#equals(java.lang.Object)
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1826
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1827
    public boolean equals(Object o) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1828
        if (o != null) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1829
            try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1830
                NumericShaper rhs = (NumericShaper)o;
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1831
                if (rangeSet != null) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1832
                    if (rhs.rangeSet != null) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1833
                        return isContextual() == rhs.isContextual()
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1834
                            && rangeSet.equals(rhs.rangeSet)
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1835
                            && shapingRange == rhs.shapingRange;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1836
                    }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1837
                    return isContextual() == rhs.isContextual()
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1838
                        && rangeSet.equals(Range.maskToRangeSet(rhs.mask))
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1839
                        && shapingRange == Range.indexToRange(rhs.key);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1840
                } else if (rhs.rangeSet != null) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1841
                    Set<Range> rset = Range.maskToRangeSet(mask);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1842
                    Range srange = Range.indexToRange(key);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1843
                    return isContextual() == rhs.isContextual()
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1844
                        && rset.equals(rhs.rangeSet)
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1845
                        && srange == rhs.shapingRange;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1846
                }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1847
                return rhs.mask == mask && rhs.key == key;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1848
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1849
            catch (ClassCastException e) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1850
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1851
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1852
        return false;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1853
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1854
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1855
    /**
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1856
     * Returns a {@code String} that describes this shaper. This method
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1857
     * is used for debugging purposes only.
35667
ed476aba94de 8138838: docs cleanup for java.desktop
avstepan
parents: 33242
diff changeset
  1858
     * @return a {@code String} describing this shaper.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1859
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1860
    public String toString() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1861
        StringBuilder buf = new StringBuilder(super.toString());
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1862
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1863
        buf.append("[contextual:").append(isContextual());
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1864
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1865
        String[] keyNames = null;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1866
        if (isContextual()) {
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1867
            buf.append(", context:");
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1868
            buf.append(shapingRange == null ? Range.values()[key] : shapingRange);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1869
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1870
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1871
        if (rangeSet == null) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1872
            buf.append(", range(s): ");
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1873
            boolean first = true;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1874
            for (int i = 0; i < NUM_KEYS; ++i) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1875
                if ((mask & (1 << i)) != 0) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1876
                    if (first) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1877
                        first = false;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1878
                    } else {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1879
                        buf.append(", ");
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1880
                    }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1881
                    buf.append(Range.values()[i]);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1882
                }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1883
            }
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1884
        } else {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1885
            buf.append(", range set: ").append(rangeSet);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1886
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1887
        buf.append(']');
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1888
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1889
        return buf.toString();
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1890
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1891
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1892
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1893
     * Returns the index of the high bit in value (assuming le, actually
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1894
     * power of 2 >= value). value must be positive.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1895
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1896
    private static int getHighBit(int value) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1897
        if (value <= 0) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1898
            return -32;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1899
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1900
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1901
        int bit = 0;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1902
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1903
        if (value >= 1 << 16) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1904
            value >>= 16;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1905
            bit += 16;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1906
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1907
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1908
        if (value >= 1 << 8) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1909
            value >>= 8;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1910
            bit += 8;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1911
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1912
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1913
        if (value >= 1 << 4) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1914
            value >>= 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1915
            bit += 4;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1916
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1917
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1918
        if (value >= 1 << 2) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1919
            value >>= 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1920
            bit += 2;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1921
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1922
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1923
        if (value >= 1 << 1) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1924
            bit += 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1925
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1926
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1927
        return bit;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1928
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1929
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1930
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1931
     * fast binary search over subrange of array.
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1932
     */
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1933
    private static int search(int value, int[] array, int start, int length)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1934
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1935
        int power = 1 << getHighBit(length);
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1936
        int extra = length - power;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1937
        int probe = power;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1938
        int index = start;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1939
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1940
        if (value >= array[index + extra]) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1941
            index += extra;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1942
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1943
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1944
        while (probe > 1) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1945
            probe >>= 1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1946
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1947
            if (value >= array[index + probe]) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1948
                index += probe;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1949
            }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1950
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1951
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1952
        return index;
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1953
    }
4280
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1954
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1955
    /**
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1956
     * Converts the {@code NumericShaper.Range} enum-based parameters,
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1957
     * if any, to the bit mask-based counterparts and writes this
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1958
     * object to the {@code stream}. Any enum constants that have no
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1959
     * bit mask-based counterparts are ignored in the conversion.
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1960
     *
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1961
     * @param stream the output stream to write to
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1962
     * @throws IOException if an I/O error occurs while writing to {@code stream}
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1963
     * @since 1.7
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1964
     */
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1965
    private void writeObject(ObjectOutputStream stream) throws IOException {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1966
        if (shapingRange != null) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1967
            int index = Range.toRangeIndex(shapingRange);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1968
            if (index >= 0) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1969
                key = index;
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1970
            }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1971
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1972
        if (rangeSet != null) {
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1973
            mask |= Range.toRangeMask(rangeSet);
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1974
        }
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1975
        stream.defaultWriteObject();
74c4e0c5d936 6842557: NumericShaper needs to be updated for Unicode 5.1 support
peytoia
parents: 2
diff changeset
  1976
    }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
  1977
}