office-gobmx/vcl/unx
Miklos Vajna 6dfac38bac tdf#162072 vcl, fontconfig: consider font-family-generic for substitute
Open the bugdoc, it has two paragraphs: first with a sans font, second
with a serif font. These fonts are missing, but their metadata clearly
state that they are sans vs serif. Still, Writer renders both as sans.

Investigating a bit, the ODT case imports the "font-family-generic" of
these fonts fine, but in the Linux case the fontconfig code ignored this
info when building the search pattern for the font fallback.

Fix the problem by extending vcl's PrintFontManager::Substitute() to
also take the vcl-level "family type" into account, which is about sans
vs serif (roman vs swiss). Note that FC_FAMILY is a string list, so once
the actual font name is added to the pattern, the next "add" will append
to this list, not drop the already added font name.

The same problem is still there with the DOCX equivalent.

Change-Id: I61f31ae73e524471a5261ac9426e5b566454a09c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170681
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-07-18 17:45:14 +02:00
..
generic tdf#162072 vcl, fontconfig: consider font-family-generic for substitute 2024-07-18 17:45:14 +02:00
gtk3 Use IsRunningUnitTest / IsRunningUITest consistently 2024-07-17 19:15:31 +02:00
gtk3_kde5
gtk4
kf5
kf6
x11