From 5ebc5f9df6972ac3d9ce7ed6a1504c48535c0881 Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Fri, 11 Sep 2020 22:34:11 +0200 Subject: Qt5 implement GetGlyphWidths Basically implement it the same way then Windows and MacOS. Change-Id: I643581af49aeb9274505e90e12acbe5bcf0c98fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102687 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski --- vcl/qt5/Qt5Graphics_Text.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'vcl') diff --git a/vcl/qt5/Qt5Graphics_Text.cxx b/vcl/qt5/Qt5Graphics_Text.cxx index 0b823858a9bb..351bb3023213 100644 --- a/vcl/qt5/Qt5Graphics_Text.cxx +++ b/vcl/qt5/Qt5Graphics_Text.cxx @@ -309,9 +309,13 @@ const void* Qt5Graphics::GetEmbedFontData(const PhysicalFontFace*, long* /*pData void Qt5Graphics::FreeEmbedFontData(const void* /*pData*/, long /*nDataLen*/) {} -void Qt5Graphics::GetGlyphWidths(const PhysicalFontFace* /*pPFF*/, bool /*bVertical*/, - std::vector& /*rWidths*/, Ucs2UIntMap& /*rUnicodeEnc*/) +void Qt5Graphics::GetGlyphWidths(const PhysicalFontFace* pFontFace, bool bVertical, + std::vector& rWidths, Ucs2UIntMap& rUnicodeEnc) { + const Qt5FontFace* pQt5FontFace = static_cast(pFontFace); + const QRawFont aRawFont(QRawFont::fromFont(pQt5FontFace->CreateFont())); + Qt5TrueTypeFont aTTF(*pQt5FontFace, aRawFont); + SalGraphics::GetGlyphWidths(aTTF, *pFontFace, bVertical, rWidths, rUnicodeEnc); } namespace -- cgit