Bug 1158468 - problems to print pure text files with the lpr or lp command in F21: only blank sheets are printed
Summary: problems to print pure text files with the lpr or lp command in F21: only bla...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-font-utils
Version: 21
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: X/OpenGL Maintenance List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-29 12:58 UTC by Joachim Backes
Modified: 2014-11-06 05:06 UTC (History)
10 users (show)

Fixed In Version: libfontenc-1.1.2-3.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-03 05:23:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1046341 0 unspecified CLOSED xterm does not display EUCJP encoding 2021-02-22 00:41:40 UTC

Internal Links: 1046341

Description Joachim Backes 2014-10-29 12:58:42 UTC
Description of problem:

having big problems with printing pure text files using the lp or lpd command since 2 or 3 days: Only empty pages are printed. This happens for my real samsung printer and with a cups-PDF printer.

On the other hand, printing to these printers from applications such as
firefox, thunderbird,... (using the print menu) is OK.

My F21 is fully updated. I downgraded already cups-client (current is
cups-client-1.7.5-13.fc21.x86_64), but this did not help.

Additionally, printing ps or pdf files with lp or lpr is done flawlessly.

Debugging cups:

Oct 29 13:29:50 localhost cupsd: Resuming new connection processing...
Oct 29 13:30:03 localhost cupsd: [Job 161] Adding start banner page "none".
Oct 29 13:30:03 localhost cupsd: [Job 161] Queued on "ml-1660" by "backes".
Oct 29 13:30:03 localhost cupsd: [Job 161] File of type text/plain
queued by "backes".
Oct 29 13:30:03 localhost cupsd: [Job 161] Adding end banner page "none".
Oct 29 13:30:03 localhost cupsd: [Job 161] Started filter
/usr/lib/cups/filter/texttopaps (PID 9533)
Oct 29 13:30:03 localhost cupsd: [Job 161] Started filter
/usr/lib/cups/filter/pstopdf (PID 9534)
Oct 29 13:30:03 localhost cupsd: [Job 161] Started filter
/usr/lib/cups/filter/pdftopdf (PID 9535)
Oct 29 13:30:03 localhost cupsd: [Job 161] Started filter
/usr/lib/cups/filter/gstoraster (PID 9536)
Oct 29 13:30:03 localhost cupsd: [Job 161] Started filter
/usr/lib/cups/filter/rastertoqpdl (PID 9537)
Oct 29 13:30:03 localhost cupsd: [Job 161] Started backend
/usr/lib/cups/backend/socket (PID 9538)
Oct 29 13:30:03 localhost cupsd: [Job 161] Color Manager: no profiles
specified in PPD
Oct 29 13:30:03 localhost cupsd: [Job 161] Start rendering...
Oct 29 13:30:03 localhost cupsd: [Job 161] Processing page 1...
Oct 29 13:30:03 localhost cupsd: [Job 161] Processing page 2...
Oct 29 13:30:03 localhost cupsd: [Job 161] Connecting to printer.
Oct 29 13:30:03 localhost cupsd: [Job 161] Connected to printer.
Oct 29 13:30:03 localhost cupsd: [Job 161] Waiting for printer to finish.
Oct 29 13:30:03 localhost cupsd: [Job 161] Job completed.
 
Version-Release number of selected component (if applicable):
cups-devel-1.7.5-13.fc21.i686
cups-pdf-2.6.1-9.fc21.x86_64
cups-filters-1.0.58-1.fc21.x86_64
cups-pk-helper-0.2.5-5.fc21.x86_64
cups-client-1.7.5-13.fc21.x86_64
cups-libs-1.7.5-13.fc21.i686
bluez-cups-5.23-1.fc21.x86_64
cups-filters-libs-1.0.58-1.fc21.x86_64
gutenprint-cups-5.2.10-5.fc21.x86_64
python3-cups-1.9.68-1.fc21.x86_64
cups-devel-1.7.5-13.fc21.x86_64
cups-filesystem-1.7.5-13.fc21.noarch
cups-libs-1.7.5-13.fc21.x86_64
cups-1.7.5-13.fc21.x86_64
cups-lpd-1.7.5-13.fc21.x86_64


How reproducible:
always

Steps to Reproduce:
1.lp /etc/passwd or lpr /etc/passwd
2.
3.

Actual results:
Only a blank page is printed

Expected results:


Additional info:

See https://lists.fedoraproject.org/pipermail/test/2014-October/123600.html

Comment 1 Jiri Popelka 2014-10-29 14:07:02 UTC
Looks like a paps related problem, running
# /usr/lib/cups/filter/texttopaps 1 me '' 1 '' < /etc/passwd > x.ps
creates blank page.
But the latest paps-0.6.8-30.fc21 is over 2 months old so it's probably not directly paps' problem when you say that you have problems only last few days.

Comment 2 Tim Waugh 2014-10-30 09:28:03 UTC
FWIW, this works fine for me, same paps version.

Comment 3 Orion Poplawski 2014-10-30 21:36:14 UTC
Interestingly, this works:

paps /usr/share/doc/paps/AUTHORS > test.ps

but this doesn't:

/usr/lib/cups/filter/texttopaps j-1 root test 1 '' /usr/share/doc/paps/AUTHORS > test.ps

Turns out that when run as texttopaps, the default font changes from Monospace 12 to Courier.  So:

paps --font=Courier /usr/share/doc/paps/AUTHORS > test.ps

reproduces the blank page.

# fc-match Courier
courR12-ISO8859-1.pcf.gz: "Courier" "Regular"

from:
/usr/share/X11/fonts/75dpi/courR12-ISO8859-1.pcf.gz
/usr/share/X11/fonts/100dpi/courR12-ISO8859-1.pcf.gz

# fc-match 'Monospace 12'
DejaVuSans.ttf: "DejaVu Sans" "Book"

on my F20 box:

# fc-match Courier
n022003l.pfb: "Nimbus Mono L" "Regular"

from urw-fonts.

So font ordering/config issues?

Comment 4 Orion Poplawski 2014-10-30 21:54:34 UTC
# ls -l /usr/share/fonts/X11
lrwxrwxrwx. 1 root root 12 Aug 18 23:08 /usr/share/fonts/X11 -> ../X11/fonts

This is causing fc-cache to search the full /usr/share/X11/fonts hierarchy, which is causing problems.

* Sat Jul 19 2014 Hans de Goede <hdegoede> - 1:7.5-20
- Add a /usr/share/fonts/X11 symlink to usr/share/X11/fonts (rhbz#1046341)

Comment 5 Tim Waugh 2014-10-31 08:57:57 UTC
Might it not be that several urw-fonts changed names without any aliases being added?
https://bugzilla.redhat.com/show_bug.cgi?id=1147931

Comment 6 Joachim Backes 2014-10-31 09:11:09 UTC
Removing /usr/share/fonts/X11 (it's a link to ../X11/fonts) seems to be a workaround for my problem!

Comment 7 Hans de Goede 2014-10-31 09:22:55 UTC
Hi,

(In reply to Tim Waugh from comment #5)
> Might it not be that several urw-fonts changed names without any aliases
> being added?
> https://bugzilla.redhat.com/show_bug.cgi?id=1147931

Looking at comment 3 it seems that the X11 symlink really is the problem, with that symlink I get the following:

[hans@shalem ~]$ fc-match Courier
courR12-ISO8859-1.pcf.gz: "Courier" "Regular"

So no "Nimbus ..." involved at all, I guess paps does not know how to deal with pcf files is causing the problem here. More in general having Courier switch font is definitely an undesirable side-effect of adding the X11 symlink.

Without the symlink I get:

[hans@shalem fonts]$ fc-match Courier
n022003l.pfb: "Nimbus Mono L" "Regular"

Note the already includes the " L" suffix which is new in F-21, so bug 1147931 is not a problem here. I'll go and revert the addition of the symlink, and instead patch luit to use the proper search path for Fedora.

Comment 8 Fedora Update System 2014-10-31 13:16:15 UTC
libfontenc-1.1.2-3.fc21,xorg-x11-font-utils-7.5-23.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/libfontenc-1.1.2-3.fc21,xorg-x11-font-utils-7.5-23.fc21

Comment 9 Akira TAGOH 2014-10-31 14:13:03 UTC
I think the difference between Nimbus and Courier from X11 font is whether an outline font or not and the applications (paps, in this case) doesn't support non-outline fonts to render. I'm not sure if there are any other applications affecting this, I should fix paps too to request the outline fonts only.

Comment 10 Akira TAGOH 2014-10-31 14:30:34 UTC
easier fix for this issue is to add the following matching rule to the fontconfig folder:

<fontconfig>
  <match>
    <test name="prgname"><string>paps</string></test>
    <edit name="scalable"><bool>true</bool></edit>
  </match>
  <match>
    <test name="prgname"><string>text2paps</string></test>
    <edit name="scalable"><bool>true</bool></edit>
  </match>
</fontconfig>

Comment 11 Akira TAGOH 2014-10-31 14:32:09 UTC
meant s/text2paps/texttopaps/

Comment 12 Hans de Goede 2014-10-31 14:32:36 UTC
(In reply to Akira TAGOH from comment #9)
> I think the difference between Nimbus and Courier from X11 font is whether
> an outline font or not and the applications (paps, in this case) doesn't
> support non-outline fonts to render. I'm not sure if there are any other
> applications affecting this, I should fix paps too to request the outline
> fonts only.

Right, but even with paps fixed, fontconfig coming up with a different font then before adding the X11 symlink is an undesirable side-effect, so the symlink needs to go away anyways, at which point fixing paps to do the right thing wrt requesting only fonts it supports becomes less important :)

Comment 13 Orion Poplawski 2014-10-31 20:19:21 UTC
It's not immediately obvious to me how you request only a scalable font in pango.

Comment 14 Orion Poplawski 2014-10-31 20:22:11 UTC
https://sourceforge.net/p/paps/bugs/16/

Comment 15 Fedora Update System 2014-11-01 17:03:26 UTC
Package libfontenc-1.1.2-3.fc21, xorg-x11-font-utils-7.5-23.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libfontenc-1.1.2-3.fc21 xorg-x11-font-utils-7.5-23.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-14122/libfontenc-1.1.2-3.fc21,xorg-x11-font-utils-7.5-23.fc21
then log in and leave karma (feedback).

Comment 16 Orion Poplawski 2014-11-03 03:32:44 UTC
After all that analysis, it may not have been the issue.  Still seems to be a problem even with fc-match returning:

n022003l.pfb: "Nimbus Mono L" "Regular"

Anyone else care to take a stab at it?

Comment 17 Fedora Update System 2014-11-03 05:23:47 UTC
libfontenc-1.1.2-3.fc21, xorg-x11-font-utils-7.5-23.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Orion Poplawski 2014-11-06 05:06:26 UTC
Actually, does seem to be working for me now.


Note You need to log in before you can comment on or make changes to this bug.