[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 7 09:05:12 UTC 2020
vcl/unx/generic/fontmanager/fontconfig.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 519d253c5525b732c624cb68495ace6eb77fa41f
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Sep 4 19:38:52 2020 +0100
Commit: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Mon Sep 7 11:04:39 2020 +0200
rhbz#1875377 if sort order is equivalent keep order fontconfig presents
there are two fonts in fedora 32/33 for regular Cantarell
/usr/share/fonts/cantarell/Cantarell-Regular.otf
and
/usr/share/fonts/cantarell/Cantarell-VF.otf
where VF is the Variable Font version. The Cantarell-Regular
ones has a CFF table and export to pdf creates a font subset
that works perfectly fine. The VF one does not have a CFF
table and the fallback case doesn't work for pdf export.
Both have the same version, use a stable sort to retain
their relative order that fontconfig presents so we use
the Cantarell-Regular version we would see if we didn't
sort by version at all.
Change-Id: I750006b980810fc59e0a152d42ae17f29f46e3b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101970
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx
index dea4cd548949..a87c2c21094c 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -213,7 +213,7 @@ FcFontSet* FontCfgWrapper::getFontSet()
addFontSet( FcSetSystem );
addFontSet( FcSetApplication );
- ::std::sort(m_pFontSet->fonts,m_pFontSet->fonts+m_pFontSet->nfont,SortFont());
+ std::stable_sort(m_pFontSet->fonts,m_pFontSet->fonts+m_pFontSet->nfont,SortFont());
}
return m_pFontSet;
More information about the Libreoffice-commits
mailing list