ADDITIONAL SYSTEM INFORMATION :
Mac OS 10.14.4
A DESCRIPTION OF THE PROBLEM :
Font.canDisplayUpTo method always returns -1 on Mac OS X even if the font doesn't contain necessary glyphs to display the string.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Mac OS includes Herculanum system font which doesn't support cyrillic characters. Execute the following function:
System.out.println(new Font("Herculanum", Font.PLAIN, 12).canDisplayUpTo("����������������"));
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The code prints "0" since "Herculanum" font doesn't support Cyrillic characters
ACTUAL -
The method returns -1 as if all characters are supported
---------- BEGIN SOURCE ----------
System.out.println(new Font("Herculanum", Font.PLAIN, 12).canDisplayUpTo("����������������"));
---------- END SOURCE ----------
FREQUENCY : always