Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

texttopdf filter does not find FreeFonts #596

Open
gurucubano opened this issue Sep 4, 2024 · 0 comments
Open

texttopdf filter does not find FreeFonts #596

gurucubano opened this issue Sep 4, 2024 · 0 comments

Comments

@gurucubano
Copy link

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:

  1. 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
...
  1. run the above test case

  2. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant