Fixed printer header footer font issue

Fix #4749, close #5003
This commit is contained in:
Rajendra Singh 2018-11-10 19:37:25 +05:30 committed by Don HO
parent 9175b55ff0
commit 6c73e5cba7

View File

@ -144,8 +144,8 @@ size_t Printer::doPrint(bool justDoIt)
TEXTMETRIC tm;
int fontSize = nppGUI._printSettings._headerFontSize?nppGUI._printSettings._headerFontSize:9;
int fontWeight = nppGUI._printSettings._headerFontStyle & (FONTSTYLE_BOLD?FW_BOLD:FW_NORMAL);
int isFontItalic = nppGUI._printSettings._headerFontStyle & (FONTSTYLE_ITALIC?TRUE:FALSE);
int fontWeight = (nppGUI._printSettings._headerFontStyle & FONTSTYLE_BOLD) ? FW_BOLD : FW_NORMAL;
int isFontItalic = (nppGUI._printSettings._headerFontStyle & FONTSTYLE_ITALIC) ? TRUE : FALSE;
const TCHAR *fontFace = (nppGUI._printSettings._headerFontName != TEXT(""))?nppGUI._printSettings._headerFontName.c_str():TEXT("Arial");
int headerLineHeight = ::MulDiv(fontSize, ptDpi.y, 72);
@ -164,8 +164,8 @@ size_t Printer::doPrint(bool justDoIt)
headerLineHeight = tm.tmHeight + tm.tmExternalLeading;
fontSize = nppGUI._printSettings._footerFontSize?nppGUI._printSettings._footerFontSize:9;
fontWeight = nppGUI._printSettings._footerFontStyle & (FONTSTYLE_BOLD?FW_BOLD:FW_NORMAL);
isFontItalic = nppGUI._printSettings._footerFontStyle & (FONTSTYLE_ITALIC?TRUE:FALSE);
fontWeight = (nppGUI._printSettings._footerFontStyle & FONTSTYLE_BOLD) ? FW_BOLD : FW_NORMAL;
isFontItalic = (nppGUI._printSettings._footerFontStyle & FONTSTYLE_ITALIC) ? TRUE : FALSE;
fontFace = (nppGUI._printSettings._footerFontName != TEXT(""))?nppGUI._printSettings._footerFontName.c_str():TEXT("Arial");
int footerLineHeight = ::MulDiv(fontSize, ptDpi.y, 72);