diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2024-07-18 15:35:49 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2024-07-18 17:45:14 +0200 |
commit | 6dfac38bacd449c64a13363797b56aff49cf8f52 (patch) | |
tree | e0e0370226041a59b5308cf8f0a3b404e2ac6881 /vcl/Module_vcl.mk | |
parent | d1bcb2f83a068ac27ff9ca43d2b004026e34f934 (diff) |
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
Diffstat (limited to 'vcl/Module_vcl.mk')
-rw-r--r-- | vcl/Module_vcl.mk | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index 35c6427b4ed1..c0a624acdc95 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -293,4 +293,12 @@ $(eval $(call gb_Module_add_slowcheck_targets,vcl,\ )) endif +ifneq ($(filter MORE_FONTS,$(BUILD_TYPE)),) +ifeq ($(OS),LINUX) +$(eval $(call gb_Module_add_slowcheck_targets,vcl,\ + CppunitTest_vcl_unx_generic \ +)) +endif +endif + # vim: set noet sw=4 ts=4: |