Merge pull request #571 from RaiKoHoff/Dev_ChngDPI

Bugfix: DPI Awareness & Fractional Font Sizes
This commit is contained in:
Rainer Kottenhoff 2018-08-02 16:43:58 +02:00 committed by GitHub
commit dcb59403ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 2 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -5571,7 +5571,8 @@ bool Style_SelectColor(HWND hwnd,bool bForeGround,LPWSTR lpszStyle,int cchStyle,
inline static int _GetDPIAwareFractFontSize(float fFontSize)
{
return MulDiv((int)(fFontSize + 0.5), (SC_FONT_SIZE_MULTIPLIER * g_uCurrentDPI), USER_DEFAULT_SCREEN_DPI);
float const fracSizeDPI = fFontSize * (float)SC_FONT_SIZE_MULTIPLIER;
return MulDiv((int)(fracSizeDPI + 0.5), g_uCurrentDPI, USER_DEFAULT_SCREEN_DPI);
}