diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2020-09-11 22:34:11 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2020-09-14 21:56:03 +0200 |
commit | 8836f7dd71d9a5f7a85b8ae7b44632f0b58542bf (patch) | |
tree | e7cfd96645e9a04ceb3f988617b051beb1a8445e | |
parent | 8f98e74ed5979d68b306dd00184a3bbdc44bdcec (diff) |
Qt5 implement GetGlyphWidths
Basically implement it the same way then Windows and MacOS.
Change-Id: I643581af49aeb9274505e90e12acbe5bcf0c98fb
-rw-r--r-- | vcl/qt5/Qt5Graphics_Text.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
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<sal_Int32>& /*rWidths*/, Ucs2UIntMap& /*rUnicodeEnc*/) +void Qt5Graphics::GetGlyphWidths(const PhysicalFontFace* pFontFace, bool bVertical, + std::vector<sal_Int32>& rWidths, Ucs2UIntMap& rUnicodeEnc) { + const Qt5FontFace* pQt5FontFace = static_cast<const Qt5FontFace*>(pFontFace); + const QRawFont aRawFont(QRawFont::fromFont(pQt5FontFace->CreateFont())); + Qt5TrueTypeFont aTTF(*pQt5FontFace, aRawFont); + SalGraphics::GetGlyphWidths(aTTF, *pFontFace, bVertical, rWidths, rUnicodeEnc); } namespace |