JBR-1714 Italic text is displayed using incorrect glyphs on Windows

port from JBR 11 to JBR 15 (cherry picked from commits 46e4cdfcbd, 9cc5cbc99b)

cherry picked from commit 6769b27e53
This commit is contained in:
Dmitry Batrak
2019-08-02 15:30:23 +03:00
committed by Vitaly Provodin
parent 233e4b7466
commit 5c12770f59

View File

@@ -386,8 +386,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;