< prev index next >
src/java.desktop/share/classes/sun/font/SunFontManager.java
Print this page
rev 59961 : 8248468: java/awt/font/DefaultFontTest/DefaultFontTest.java fails in SunFontManager.findFont2D
*** 351,360 ****
--- 351,363 ----
*/
fontConfig = createFontConfiguration();
String[] fontInfo = getDefaultPlatformFont();
defaultFontName = fontInfo[0];
+ if (defaultFontName == null && FontUtilities.debugFonts()) {
+ FontUtilities.getLogger().warning("defaultFontName is null");
+ }
defaultFontFileName = fontInfo[1];
String extraFontPath = fontConfig.getExtraFontPath();
/* In prior releases the debugging font path replaced
*** 1886,1895 ****
--- 1889,1899 ----
* A font may exist with the specified style, or it may
* exist only in some other style. For non-native fonts the scaler
* 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);
/* If preferLocaleFonts() or preferProportionalFonts() has been
* called we may be using an alternate set of composite fonts in this
< prev index next >