changeset 39024:9c63f12138b7

8078382: Wrong glyph is displayed for a derived font Reviewed-by: prr, serb
author bae
date Thu, 02 Jun 2016 15:36:15 +0300
parents 8b91cb9a723e
children bbc996c042d3
files jdk/src/java.desktop/share/classes/sun/font/FontFamily.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/java.desktop/share/classes/sun/font/FontFamily.java	Thu Jun 02 15:20:31 2016 +0530
+++ b/jdk/src/java.desktop/share/classes/sun/font/FontFamily.java	Thu Jun 02 15:36:15 2016 +0300
@@ -335,10 +335,10 @@
         case Font.BOLD|Font.ITALIC:
             if (bolditalic != null) {
                 return bolditalic;
+            } else if (bold != null && bold.canDoStyle(style)) {
+                return bold;
             } else if (italic != null && italic.canDoStyle(style)) {
                     return italic;
-            } else if (bold != null && bold.canDoStyle(style)) {
-                    return italic;
             } else if (plain != null && plain.canDoStyle(style)) {
                     return plain;
             } else {