[Libreoffice-commits] core.git: vcl/qt5
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 15 04:44:05 UTC 2020
vcl/qt5/Qt5Graphics_Text.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 5ebc5f9df6972ac3d9ce7ed6a1504c48535c0881
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Sep 11 22:34:11 2020 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Tue Sep 15 06:43:15 2020 +0200
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 <glogow at fbihome.de>
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
More information about the Libreoffice-commits
mailing list