vcl/qt5/Qt5Graphics_Text.cxx | 15 --------------- 1 file changed, 15 deletions(-)
New commits: commit 9ad2443bfe127dfe8e8940461119d36872b6c186 Author: Jan-Marek Glogowski <[email protected]> AuthorDate: Sat Mar 23 01:15:27 2019 +0000 Commit: Jan-Marek Glogowski <[email protected]> CommitDate: Sat Mar 23 13:56:15 2019 +0100 tdf#123072 Qt5 don't register unknown PSP fonts LO's own font handling backend has some additional font styles, which are unknown to Qt, probably because it uses some stricter handling to decide which fonts are "usable", and because Qt seems to not know about some style types AFAIK. The main problem is QFontDatabase::addApplicationFont, as this seems to parse the whole font instead of a kind of registration, which takes ages for something like the Noto CJK style variants. As a workaround this drops the registration of all the additional PSP fonts. Both Qt5 and PSP use fontconfig but there is definitly some difference here, which needs to be resolved in some other way at some point. Change-Id: Id63cd0258ff56ee988323551820500b2c72a12be Reviewed-on: https://gerrit.libreoffice.org/69576 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <[email protected]> diff --git a/vcl/qt5/Qt5Graphics_Text.cxx b/vcl/qt5/Qt5Graphics_Text.cxx index 5943b32c611b..693f67fe2df0 100644 --- a/vcl/qt5/Qt5Graphics_Text.cxx +++ b/vcl/qt5/Qt5Graphics_Text.cxx @@ -97,9 +97,6 @@ void Qt5Graphics::GetDevFontList(PhysicalFontCollection* pPFC) return; QFontDatabase aFDB; - QStringList aFontFamilyList; - if (bUseFontconfig) - aFontFamilyList = aFDB.families(); GlyphCache& rGC = GlyphCache::GetInstance(); psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); ::std::vector<psp::fontID> aList; @@ -120,18 +117,6 @@ void Qt5Graphics::GetDevFontList(PhysicalFontCollection* pPFC) aDFA.IncreaseQualityBy(4096); const OString& rFileName = rMgr.getFontFileSysPath(aInfo.m_nID); rGC.AddFontFile(rFileName, nFaceNum, nVariantNum, aInfo.m_nID, aDFA); - - // register font files unknown to Qt - if (bUseFontconfig) - { - QString aFilename = toQString( - OStringToOUString(rMgr.getFontFileSysPath(aInfo.m_nID), RTL_TEXTENCODING_UTF8)); - QRawFont aRawFont(aFilename, 0.0); - QString aFamilyName = aRawFont.familyName(); - if (!aFontFamilyList.contains(aFamilyName) - || !aFDB.styles(aFamilyName).contains(aRawFont.styleName())) - QFontDatabase::addApplicationFont(aFilename); - } } if (bUseFontconfig) _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
