- 
    Bug 
- 
    Resolution: Not an Issue
- 
     P3 P3
- 
    8, 9, 12, 13
- 
        x86
- 
        os_x
                    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
            
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
- duplicates
- 
                    JDK-8252965 [macos] Font.canDisplayUpTo returns wrong index for Indic text which causes crash later | OpenJDK Corretto 8.265.01.2 -           
- Closed
 
-