< prev index next >
src/java.desktop/share/classes/sun/font/CharToGlyphMapper.java
Print this page
@@ -34,10 +34,14 @@
public static final int HI_SURROGATE_START = 0xD800;
public static final int HI_SURROGATE_END = 0xDBFF;
public static final int LO_SURROGATE_START = 0xDC00;
public static final int LO_SURROGATE_END = 0xDFFF;
+ public static final int VS_START = 0xFE00;
+ public static final int VS_END = 0xFE0F;
+ public static final int VSS_START = 0xE0100;
+ public static final int VSS_END = 0xE01FF;
public static final int UNINITIALIZED_GLYPH = -1;
public static final int INVISIBLE_GLYPH_ID = 0xffff;
public static final int INVISIBLE_GLYPHS = 0xfffe; // and above
@@ -86,6 +90,40 @@
char[] unicodes, int[] glyphs);
public abstract void charsToGlyphs(int count,
int[] unicodes, int[] glyphs);
+ protected boolean hasVariationSelectorGlyph(int charCode,
+ int variationSelector) {
+ return false;
+ }
+
+ public static boolean isBaseChar(int charCode) {
+ int type = Character.getType(charCode);
+ if (type == Character.UNASSIGNED ||
+ type == Character.CONTROL ||
+ type == Character.FORMAT ||
+ type == Character.NON_SPACING_MARK) {
+ return false;
+ }
+ return java.text.Normalizer.isNormalized(
+ java.nio.CharBuffer.wrap(Character.toChars(charCode)),
+ java.text.Normalizer.Form.NFD);
+ }
+
+ public static boolean isVariationSelector(int charCode) {
+ return ((charCode >= VSS_START && charCode <= VSS_END) ||
+ (charCode >= VS_START && charCode <= VS_END));
+ }
+
+ public static boolean isVariationSelector(char charCode) {
+ return (charCode >= VS_START && charCode <= VS_END);
+ }
+
+ public static boolean isVariationSelector(char charCode1,
+ char charCode2) {
+ return (charCode1 == 0xDB40 &&
+ (charCode2 >= 0xDD00 && charCode2 <= 0xDDEF));
+ // VSS_START - VSS_END
+ }
+
}
< prev index next >