-
Bug
-
Resolution: Unresolved
-
P4
-
21
-
x86_64
-
windows_10
A DESCRIPTION OF THE PROBLEM :
Font.canDisplay(int) and Font.canDisplayUpTo do not work correctly with variation selectors.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Install some Japanese fonts for all users and run the test code.
---------- BEGIN SOURCE ----------
public static void main(String[] args) {
int cp[] = { 0x8FBB, 0xE0101 };
String str = new String(cp, 0, cp.length);
System.out.println(str);
Font font = new Font(fontName, Font.PLAIN, 12);
System.out.println(font.canDisplayUpTo(str) == -1); // => false
System.out.println(font.canDisplay(cp[0])); // => true
System.out.println(font1.canDisplay(cp[1])); // => false
}
---------- END SOURCE ----------
Font.canDisplay(int) and Font.canDisplayUpTo do not work correctly with variation selectors.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Install some Japanese fonts for all users and run the test code.
---------- BEGIN SOURCE ----------
public static void main(String[] args) {
int cp[] = { 0x8FBB, 0xE0101 };
String str = new String(cp, 0, cp.length);
System.out.println(str);
Font font = new Font(fontName, Font.PLAIN, 12);
System.out.println(font.canDisplayUpTo(str) == -1); // => false
System.out.println(font.canDisplay(cp[0])); // => true
System.out.println(font1.canDisplay(cp[1])); // => false
}
---------- END SOURCE ----------