Use ceil instead of round in GetAveCharWidth and GetSpaceWidth for consistency with GetMaxAdvance. b=428458 r=pavlov sr=roc a1.9=damons

This commit is contained in:
karlt+@karlt.net 2008-04-15 16:34:06 -07:00
parent 11399549ba
commit f1354bea5a

View File

@ -252,15 +252,15 @@ nsThebesFontMetrics::GetFontHandle(nsFontHandle &aHandle)
NS_IMETHODIMP
nsThebesFontMetrics::GetAveCharWidth(nscoord& aAveCharWidth)
{
aAveCharWidth = ROUND_TO_TWIPS(GetMetrics().aveCharWidth);
// Use CEIL instead of ROUND for consistency with GetMaxAdvance
aAveCharWidth = CEIL_TO_TWIPS(GetMetrics().aveCharWidth);
return NS_OK;
}
NS_IMETHODIMP
nsThebesFontMetrics::GetSpaceWidth(nscoord& aSpaceCharWidth)
{
aSpaceCharWidth = ROUND_TO_TWIPS(GetMetrics().spaceWidth);
aSpaceCharWidth = CEIL_TO_TWIPS(GetMetrics().spaceWidth);
return NS_OK;
}