From 6c73e5cba7e1ad1d6f2ced85e3e2df11c393e734 Mon Sep 17 00:00:00 2001 From: Rajendra Singh Date: Sat, 10 Nov 2018 19:37:25 +0530 Subject: [PATCH] Fixed printer header footer font issue Fix #4749, close #5003 --- PowerEditor/src/ScitillaComponent/Printer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PowerEditor/src/ScitillaComponent/Printer.cpp b/PowerEditor/src/ScitillaComponent/Printer.cpp index 72cbc274..cab9fa58 100644 --- a/PowerEditor/src/ScitillaComponent/Printer.cpp +++ b/PowerEditor/src/ScitillaComponent/Printer.cpp @@ -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);