From: Vadim Zeitlin Date: Thu, 16 Jun 2011 15:13:49 +0000 (+0000) Subject: Round font sizes in AdjustToSymbolicSize() instead of truncating. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f76c3ff6775e109cf5c49cfa1f0471543b170ae3 Round font sizes in AdjustToSymbolicSize() instead of truncating. This was mainly done to suppress g++ warning about implicit float to int conversion but it also seems to make more sense to round the value here instead of truncating it to int. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/fontcmn.cpp b/src/common/fontcmn.cpp index 1bc3151fcb..d54521c449 100644 --- a/src/common/fontcmn.cpp +++ b/src/common/fontcmn.cpp @@ -29,6 +29,7 @@ #ifndef WX_PRECOMP #include "wx/dc.h" #include "wx/intl.h" + #include "wx/math.h" #include "wx/dcscreen.h" #include "wx/log.h" #include "wx/gdicmn.h" @@ -511,7 +512,7 @@ int wxFontBase::AdjustToSymbolicSize(wxFontSymbolicSize size, int base) WrongFontSizeFactorsSize ); - return factors[size - wxFONTSIZE_XX_SMALL]*base; + return wxRound(factors[size - wxFONTSIZE_XX_SMALL]*base); } wxFont& wxFont::MakeBold()