vcl/source/font/fontmetric.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit c3b5eea4304ad6815b491f549fce008a9630c213 Author: Khaled Hosny <kha...@aliftype.com> AuthorDate: Fri Sep 30 21:10:21 2022 +0200 Commit: خالد حسني <kha...@aliftype.com> CommitDate: Fri Sep 30 22:28:21 2022 +0200 vcl: Use LogicalFontInstance::GetScale() Change-Id: I5f79fddd4e514c8224446e2327528002e9daa566 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140808 Tested-by: Jenkins Reviewed-by: خالد حسني <kha...@aliftype.com> diff --git a/vcl/source/font/fontmetric.cxx b/vcl/source/font/fontmetric.cxx index cdae023f0b50..e4d4089b5829 100644 --- a/vcl/source/font/fontmetric.cxx +++ b/vcl/source/font/fontmetric.cxx @@ -517,8 +517,8 @@ void ImplFontMetricData::ImplCalcLineSpacing(LogicalFontInstance* pFontInstance) void ImplFontMetricData::ImplInitBaselines(LogicalFontInstance *pFontInstance) { hb_font_t* pHbFont = pFontInstance->GetHbFont(); - double nUPEM = pFontInstance->GetFontFace()->UnitsPerEm(); - double fScale = mnHeight / nUPEM; + double fScale = 0; + pFontInstance->GetScale(nullptr, &fScale); hb_position_t nBaseline = 0; if (hb_ot_layout_get_baseline(pHbFont,