[cups] filter/texttopdf.c does not recognise the freefonts with fontconfig

Matthias Apitz guru at unixarea.de
Wed Jan 27 01:27:46 PST 2016


El día Tuesday, January 26, 2016 a las 12:22:04PM +0100, Matthias Apitz escribió:

> >       FcPatternGetString  (candidates->fonts[i], FC_FONTFORMAT, 0, &fontformat);
> 
> I have fontconfig 2.11.91 compiled from source and installed on Linux
> and SPARC and compared what the tool 'fc-match' on both systems see
> about the same file /usr/share/fonts/FreeFont/FreeMono.ttf. In SPARC the
> information about 'fontformat' is not returned and due to this
> cups-filter' texttopdf failes.

I filed a bug report as:

https://bugs.freedesktop.org/show_bug.cgi?id=93873

and got a fix; with this texttopdf runs now fine; the next issue is a
crash in the filter pdftops; the three filters by their own are working
fine and I checked the resulting PDF or PS file, they are all fine:

# PPD=/usr/local/sisis-pap/cups2/etc/cups/ppd/ps.ppd export PPD
# CHARSET=utf-8 export CHARSET
# /usr/local/sisis-pap/cups2/lib/cups/filter/texttopdf job user title 1 "" > /tmp/x.pdf < CUPS-UTF8.txt 
DEBUG: Page = 595x842; 12,12 to 583,830


# /usr/local/sisis-pap/cups2/lib/cups/filter/pdftopdf job user title 1 "" > /tmp/y.pdf < /tmp/x.pdf

# /usr/local/sisis-pap/cups2/lib/cups/filter/pdftops job user title 1 "" < /tmp/y.pdf > /tmp/x.ps
DEBUG: pdftops - copying to temp print file "/tmp/0317656ae5fda"
DEBUG: Printer make and model: Generic PostScript Printer
DEBUG: Running command line for pstops: pstops job user title 1
DEBUG: No resolution information found in the PPD file.
DEBUG: Using image rendering resolution 300 dpi
DEBUG: Running command line for gs: gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite -sOUTPUTFILE=%stdout -dLanguageLevel=2 -r
300 -dCompressFonts=false -dNoT3CCITT -dNOINTERPOLATE -c 'save pop' -f /tmp/0317656ae5fda
DEBUG: Started filter gs (PID 12663)
DEBUG: Started filter pstops (PID 12664)
DEBUG: Page = 595x842; 12,12 to 583,830
DEBUG: slow_collate=0, slow_duplex=0, slow_order=0
...
PAGE: 6 1
DEBUG: pagew = 571.0, pagel = 818.0
DEBUG: bboxx = 0, bboxy = 0, bboxw = 595, bboxl = 842
DEBUG: PageLeft = 12.0, PageRight = 583.0
DEBUG: PageTop = 830.0, PageBottom = 12.0
DEBUG: PageWidth = 595.0, PageLength = 842.0
DEBUG: Wrote 6 pages...
DEBUG: PID 12664 (pstops) exited with no errors.
DEBUG: PID 12663 (gs) exited with no errors.


but when the filter chain is run by the scheduler, the pdftops crashes
with SIGSEGV:

/usr/local/sisis-pap/cups2/var/log/cups/error_log:

D [27/Jan/2016:09:48:04 -0100] [Job 16] Looking up "localhost"...
D [27/Jan/2016:09:48:04 -0100] [Job 16] PID 7947 (/usr/local/sisis-pap/cups2/lib/cups/filter/texttopdf) exited with no errors.
D [27/Jan/2016:09:48:04 -0100] [Job 16] PID 7948 (/usr/local/sisis-pap/cups2/lib/cups/filter/pdftopdf) exited with no errors.
D [27/Jan/2016:09:48:04 -0100] [Job 16] Printer make and model: Generic PostScript Printer
D [27/Jan/2016:09:48:04 -0100] [Job 16] PID 7950 (/usr/local/sisis-pap/cups2/lib/cups/filter/pdftops) crashed on signal 11.
D [27/Jan/2016:09:48:08 -0100] [Job 16] prtGeneralCurrentLocalization type is 0, expected 2!
D [27/Jan/2016:09:48:08 -0100] [Job 16] backendWaitLoop(snmp_fd=5, addr=100118098, side_cb=100002100)
D [27/Jan/2016:09:48:08 -0100] [Job 16] PID 7952 (/usr/local/sisis-pap/cups2/lib/cups/backend/socket) exited with no errors.
D [27/Jan/2016:09:48:08 -0100] Discarding unused job-state-changed event...
E [27/Jan/2016:09:48:08 -0100] [Job 16] Job stopped due to filter errors; please consult the error_log file for details.


Any idea apart from recompiling it with debug and looking into the core?

Thanks

	matthias


-- 
Matthias Apitz, ✉ guru at unixarea.de, ⌂ http://www.unixarea.de/  ☎ +49-176-38902045
UNIX since V7 on PDP-11 | UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2 | FreeBSD since 2.2.5



More information about the cups mailing list