src/java.desktop/share/classes/java/awt/font/NumericShaper.java
Print this page
*** 87,97 ****
* NumericShaper.ARABIC | NumericShaper.TAMIL
* </pre></blockquote>
* or creating a {@code Set} with the {@link NumericShaper.Range}
* constants, such as:
* <blockquote><pre>
! * EnumSet.of(NumericShaper.Scirpt.ARABIC, NumericShaper.Range.TAMIL)
* </pre></blockquote>
* The enum-based ranges are a super set of the bit mask-based ones.
*
* <p>If the two interfaces are mixed (including serialization),
* Unicode range values are mapped to their counterparts where such
--- 87,97 ----
* NumericShaper.ARABIC | NumericShaper.TAMIL
* </pre></blockquote>
* or creating a {@code Set} with the {@link NumericShaper.Range}
* constants, such as:
* <blockquote><pre>
! * EnumSet.of(NumericShaper.Range.ARABIC, NumericShaper.Range.TAMIL)
* </pre></blockquote>
* The enum-based ranges are a super set of the bit mask-based ones.
*
* <p>If the two interfaces are mixed (including serialization),
* Unicode range values are mapped to their counterparts where such
*** 473,483 ****
public static final int MONGOLIAN = 1<<18;
/** Identifies all ranges, for full contextual shaping.
*
* <p>This constant specifies all of the bit mask-based
! * ranges. Use {@code EmunSet.allOf(NumericShaper.Range.class)} to
* specify all of the enum-based ranges.
*/
public static final int ALL_RANGES = 0x0007ffff;
private static final int EUROPEAN_KEY = 0;
--- 473,483 ----
public static final int MONGOLIAN = 1<<18;
/** Identifies all ranges, for full contextual shaping.
*
* <p>This constant specifies all of the bit mask-based
! * ranges. Use {@code EnumSet.allOf(NumericShaper.Range.class)} to
* specify all of the enum-based ranges.
*/
public static final int ALL_RANGES = 0x0007ffff;
private static final int EUROPEAN_KEY = 0;
*** 1066,1083 ****
private NumericShaper(Range defaultContext, Set<Range> ranges) {
shapingRange = defaultContext;
rangeSet = EnumSet.copyOf(ranges); // throws NPE if ranges is null.
! // Give precedance to EASTERN_ARABIC if both ARABIC and
// EASTERN_ARABIC are specified.
if (rangeSet.contains(Range.EASTERN_ARABIC)
&& rangeSet.contains(Range.ARABIC)) {
rangeSet.remove(Range.ARABIC);
}
! // As well as the above case, give precedance to TAI_THAM_THAM if both
// TAI_THAM_HORA and TAI_THAM_THAM are specified.
if (rangeSet.contains(Range.TAI_THAM_THAM)
&& rangeSet.contains(Range.TAI_THAM_HORA)) {
rangeSet.remove(Range.TAI_THAM_HORA);
}
--- 1066,1083 ----
private NumericShaper(Range defaultContext, Set<Range> ranges) {
shapingRange = defaultContext;
rangeSet = EnumSet.copyOf(ranges); // throws NPE if ranges is null.
! // Give precedence to EASTERN_ARABIC if both ARABIC and
// EASTERN_ARABIC are specified.
if (rangeSet.contains(Range.EASTERN_ARABIC)
&& rangeSet.contains(Range.ARABIC)) {
rangeSet.remove(Range.ARABIC);
}
! // As well as the above case, give precedence to TAI_THAM_THAM if both
// TAI_THAM_HORA and TAI_THAM_THAM are specified.
if (rangeSet.contains(Range.TAI_THAM_THAM)
&& rangeSet.contains(Range.TAI_THAM_HORA)) {
rangeSet.remove(Range.TAI_THAM_HORA);
}