mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-11 21:03:05 +08:00
Merge pull request #571 from RaiKoHoff/Dev_ChngDPI
Bugfix: DPI Awareness & Fractional Font Sizes
This commit is contained in:
commit
dcb59403ea
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.
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user