vcl: Rename Font::Set/GetAverageFontWidth to Set/GetFontWidth

It is a misnomer now, so return to the original name.

Also drop the redundant private Font::GetAverageFontSize().

Change-Id: I67495fa675091b459a4e90ac09665489cc61fdd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207991
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
This commit is contained in:
Khaled Hosny
2026-07-14 00:16:59 +02:00
committed by Khaled Hosny
parent aa1e992c23
commit ef3c39851d
18 changed files with 57 additions and 59 deletions
@@ -789,8 +789,8 @@ namespace cppcanvas::internal
if( nFontWidthLog != 0 )
{
vcl::Font aTestFont = rFont;
aTestFont.SetAverageFontWidth( 0 );
sal_Int32 nNormalWidth = rParms.mrVDev.GetFontMetric( aTestFont ).GetAverageFontWidth();
aTestFont.SetFontWidth( 0 );
sal_Int32 nNormalWidth = rParms.mrVDev.GetFontMetric( aTestFont ).GetFontWidth();
if( nNormalWidth != nFontWidthLog )
if( nNormalWidth )
aFontMatrix.m00 = static_cast<double>(nFontWidthLog) / nNormalWidth;