rhbz#1875377 if sort order is equivalent keep order fontconfig presents
commita7edf89360c26c5db755c146193063cbd7792d33
authorCaolán McNamara <caolanm@redhat.com>
Fri, 4 Sep 2020 18:38:52 +0000 (4 19:38 +0100)
committerAndras Timar <andras.timar@collabora.com>
Wed, 9 Sep 2020 09:58:25 +0000 (9 11:58 +0200)
treea4f73d35f06b6318d8c81ea90fa95cd61db42c44
parente63d875ee87728cb5b3f0739072e719b80f64427
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>
vcl/unx/generic/fontmanager/fontconfig.cxx