From e6aa51affc269753644222103d55f7655e84bfa2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 14 Apr 2021 10:02:08 +0100 Subject: use original FontAttributes instead of an intermediate FastPrintFontInfo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id8f8ea9b9d144d5bf9eace81ecc07e6b5dce6d41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114077 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- vcl/unx/generic/fontmanager/fontconfig.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vcl/unx/generic/fontmanager') diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx index 17ca8f46ccae..1ebe39ca4b98 100644 --- a/vcl/unx/generic/fontmanager/fontconfig.cxx +++ b/vcl/unx/generic/fontmanager/fontconfig.cxx @@ -1097,7 +1097,7 @@ void FontConfigFontOptions::SyncPattern(const OString& rFileName, sal_uInt32 nIn FcPatternAddBool(mpPattern, FC_EMBOLDEN, bEmbolden ? FcTrue : FcFalse); } -std::unique_ptr PrintFontManager::getFontOptions(const FastPrintFontInfo& rInfo, int nSize) +std::unique_ptr PrintFontManager::getFontOptions(const FontAttributes& rInfo, int nSize) { FontCfgWrapper& rWrapper = FontCfgWrapper::get(); @@ -1105,7 +1105,7 @@ std::unique_ptr PrintFontManager::getFontOptions(const Fa FcConfig* pConfig = FcConfigGetCurrent(); FcPattern* pPattern = FcPatternCreate(); - OString sFamily = OUStringToOString( rInfo.m_aFamilyName, RTL_TEXTENCODING_UTF8 ); + OString sFamily = OUStringToOString( rInfo.GetFamilyName(), RTL_TEXTENCODING_UTF8 ); std::unordered_map< OString, OString >::const_iterator aI = rWrapper.m_aLocalizedToCanonical.find(sFamily); if (aI != rWrapper.m_aLocalizedToCanonical.end()) @@ -1114,7 +1114,7 @@ std::unique_ptr PrintFontManager::getFontOptions(const Fa FcPatternAddString(pPattern, FC_FAMILY, reinterpret_cast(sFamily.getStr())); // TODO: ePitch argument of always PITCH_DONTKNOW is suspicious - addtopattern(pPattern, rInfo.m_eItalic, rInfo.m_eWeight, rInfo.m_eWidth, PITCH_DONTKNOW); + addtopattern(pPattern, rInfo.GetItalic(), rInfo.GetWeight(), rInfo.GetWidthType(), PITCH_DONTKNOW); FcPatternAddDouble(pPattern, FC_PIXEL_SIZE, nSize); FcConfigSubstitute(pConfig, pPattern, FcMatchPattern); -- cgit