cups-filters
cups-filters copied to clipboard
texttopdf filter does not find FreeFonts
Describe the bug
We use since "ages" the components
cups-2.3.6 fontconfig-2.13.93 cups-filters-1.0.62
to print UTF-8 test files to Postscript printers through the filter "texttops". I recompiled everything for OpenSSL 3.0.12 and since then "texttops" stops working with the following messages:
CHARSET=utf-8 strace -s128 -o texttopdf.tr /usr/local/sisis-pap/cups2/lib/cups/filter/texttopdf 1 1 1 1 1 UTF-8-demo.txt > out.pdf
No viable font found
WARNING: Ignored bad font "FreeMono"
No viable font found
WARNING: Ignored bad font "FreeMono"
No viable font found
...
The identical error messages show up in the cupsd "error_log" when yout let cupsd process this as a job.
To Reproduce Steps to reproduce the behavior:
- Create the config as:
ls -l /usr/local/sisis-pap/cups2/share/cups/charsets/pdf.utf-8
lrwxrwxrwx 1 root root 18 4. Sep 12:17 /usr/local/sisis-pap/cups2/share/cups/charsets/pdf.utf-8 -> pdf.utf-8.freefont
head /usr/local/sisis-pap/cups2/share/cups/charsets/pdf.utf-8
charset utf8
#
# This file defines the font mappings used for Unicode/UTF-8 text printing
# through PDF.
# ...
# ...
0000 00FF ltor single FreeMono FreeMono:bold FreeMono:oblique FreeMono:bold:oblique
0100 02FF ltor single FreeMono FreeMono:bold FreeMono:oblique FreeMono:bold:oblique
...
-
run the above test case
-
check the traces produced by "strace" which show that the font files are accessed:
grep FreeFont texttopdf.tr | grep open | grep ttf | grep -v NOENT | more
openat(AT_FDCWD, "/usr/share/fonts/FreeFont/FreeMono.ttf", O_RDONLY) = 6
openat(AT_FDCWD, "/usr/share/fonts/FreeFont/FreeMono.ttf", O_RDONLY) = 6
openat(AT_FDCWD, "/usr/share/fonts/FreeFont/FreeMonoBold.ttf", O_RDONLY) = 6
openat(AT_FDCWD, "/usr/share/fonts/FreeFont/FreeMonoBold.ttf", O_RDONLY) = 6
...
/usr/local/sisis-pap/cups2/bin/fc-match -s FreeMono | grep Free
FreeMono.ttf: "FreeMono" "Standard"
FreeSerif.ttf: "FreeSerif" "Mittel"
FreeSans.ttf: "FreeSans" "Mittel"
System Information:
- OS: SuSE Linux Enterprise 15.0 SP5