diff --git a/src/java.desktop/share/classes/sun/font/FileFontStrike.java b/src/java.desktop/share/classes/sun/font/FileFontStrike.java index ba86b80eb473..6f9e12350292 100644 --- a/src/java.desktop/share/classes/sun/font/FileFontStrike.java +++ b/src/java.desktop/share/classes/sun/font/FileFontStrike.java @@ -388,8 +388,12 @@ public class FileFontStrike extends PhysicalStrike { long getGlyphImageFromWindows(int glyphCode) { String family = fileFont.getFamilyName(null); + FontFamily fontFamily = FontFamily.getFamily(family); int style = desc.style & Font.BOLD | desc.style & Font.ITALIC | fileFont.getStyle(); + if (fontFamily != null && fontFamily.getFont(style) != fileFont) { + style = fileFont.getStyle(); + } int size = intPtSize; byte charset = fileFont.getSupportedCharset(); long ptr = 0;