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

(cherry picked from commit eccee72823)
This commit is contained in:
Dmitry Batrak
2019-08-02 15:30:23 +03:00
committed by jbrbot
parent 3511e15498
commit 684024b51e

View File

@@ -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;