Merge pull request #6970 from spycrab/qt_win32_weight

Qt/Win32: Remove font weight calculation
This commit is contained in:
spycrab 2018-05-26 15:09:22 +02:00 committed by GitHub
commit 59cd188391
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 5 deletions

View File

@ -111,11 +111,6 @@ int main(int argc, char* argv[])
QFont font = QApplication::font();
font.setFamily(QString::fromStdString(UTF16ToUTF8(logfont.lfFaceName)));
// LOGFONT uses a scale from 1 to 1000 to represent font weight while Qt uses a scale from 0
// to 99. LOGFONT also has a DONTCARE value which we have to ignore.
if (logfont.lfWeight != FW_DONTCARE)
font.setWeight((logfont.lfWeight / 10) - 1);
font.setItalic(logfont.lfItalic);
font.setStrikeOut(logfont.lfStrikeOut);
font.setUnderline(logfont.lfUnderline);