Prevent rounding down fontheights depending on display resolution for macOS

Change-Id: Ifb0ba848de3613e49237fd1e4b4739915154f355
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138744
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
This commit is contained in:
Thorsten Wagner 2022-08-23 21:25:23 +02:00 committed by Adolfo Jayme Barrientos
parent b323f1fba2
commit 5bf4f36b50

View file

@ -1181,7 +1181,7 @@ static vcl::Font getFont( NSFont* pFont, sal_Int32 nDPIY, const vcl::Font& rDefa
if( pFont )
{
aResult.SetFamilyName( GetOUString( [pFont familyName] ) );
aResult.SetFontHeight( static_cast<int>(([pFont pointSize] * 72.0 / static_cast<float>(nDPIY))+0.5) );
aResult.SetFontHeight( static_cast<int>(ceil([pFont pointSize] * 72.0 / static_cast<float>(nDPIY))) );
aResult.SetItalic( ([pFont italicAngle] != 0.0) ? ITALIC_NORMAL : ITALIC_NONE );
// FIMXE: bold ?
}