--- old/src/java.desktop/share/classes/sun/font/SunFontManager.java 2019-10-08 01:50:00.427471997 +0900 +++ new/src/java.desktop/share/classes/sun/font/SunFontManager.java 2019-10-08 01:49:59.882483169 +0900 @@ -1077,8 +1077,11 @@ * trying to gracefully handle/recover from a system * misconfiguration and this is probably a reasonable substitution. */ - defaultPhysicalFont = (PhysicalFont) + Font2D font2d = findFont2D(getDefaultFontFaceName(), Font.PLAIN, NO_FALLBACK); + if (font2d instanceof PhysicalFont) { + defaultPhysicalFont = (PhysicalFont) font2d; + } if (defaultPhysicalFont == null) { /* Because of the findFont2D call above, if we reach here, we * know all fonts have already been loaded, just accept any @@ -1089,6 +1092,9 @@ Iterator i = physicalFonts.values().iterator(); if (i.hasNext()) { defaultPhysicalFont = i.next(); + if (font2d instanceof CompositeFont) { + defaultPhysicalFont = ((CompositeFont) font2d).getSlotFont(0); + } } else { throw new Error("Probable fatal error:No fonts found."); }