< prev index next >
src/java.desktop/unix/classes/sun/awt/FcFontManager.java
Print this page
rev 59961 : 8248468: java/awt/font/DefaultFontTest/DefaultFontTest.java fails in SunFontManager.findFont2D
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -87,11 +87,12 @@
* If we didn't match, pick the first, or just make something
* up so we don't NPE.
*/
if (info[0] == null) {
if (fontConfigFonts != null && fontConfigFonts.length > 0 &&
- fontConfigFonts[0].firstFont.fontFile != null) {
+ fontConfigFonts[0].firstFont.fontFile != null &&
+ fontConfigFonts[0].firstFont.fullName != null) {
info[0] = fontConfigFonts[0].firstFont.fullName;
info[1] = fontConfigFonts[0].firstFont.fontFile;
} else {
info[0] = "Dialog";
info[1] = "/dialog.ttf";
< prev index next >