8248468: java/awt/font/DefaultFontTest/DefaultFontTest.java fails in SunFontManager.findFont2D

Reviewed-by: jdv
This commit is contained in:
Matthias Baesken 2020-06-29 09:59:45 +02:00
parent af51a73224
commit f23c983a46
2 changed files with 7 additions and 2 deletions

View file

@ -353,6 +353,9 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
String[] fontInfo = getDefaultPlatformFont();
defaultFontName = fontInfo[0];
if (defaultFontName == null && FontUtilities.debugFonts()) {
FontUtilities.getLogger().warning("defaultFontName is null");
}
defaultFontFileName = fontInfo[1];
String extraFontPath = fontConfig.getExtraFontPath();
@ -1888,6 +1891,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
* may be able to emulate the required style.
*/
public Font2D findFont2D(String name, int style, int fallback) {
if (name == null) return null;
String lowerCaseName = name.toLowerCase(Locale.ENGLISH);
String mapName = lowerCaseName + dotStyleStr(style);