diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-04 19:38:52 +0100 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2020-09-07 11:05:08 +0200 |
commit | a194b7169727edfdad6936facb910f11d0d2d6f9 (patch) | |
tree | bf149b0f95704a4ba347fc4b50c850161d861e15 | |
parent | Resolves: tdf#136189 don't try and sort until treeview is filled (diff) | |
download | core-a194b7169727edfdad6936facb910f11d0d2d6f9.tar.gz core-a194b7169727edfdad6936facb910f11d0d2d6f9.zip |
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/+/101971
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rw-r--r-- | vcl/unx/generic/fontmanager/fontconfig.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx index 75343a41b771..94bf77a85428 100644 --- a/vcl/unx/generic/fontmanager/fontconfig.cxx +++ b/vcl/unx/generic/fontmanager/fontconfig.cxx @@ -212,7 +212,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; |