Bug 17493 - poppler won't render courier (base 14 monospace font) non-oblique or non-bold
Summary: poppler won't render courier (base 14 monospace font) non-oblique or non-bold
Status: RESOLVED DUPLICATE of bug 14883
Alias: None
Product: fontconfig
Classification: Unclassified
Component: library (show other bugs)
Version: 2.5
Hardware: All All
: medium normal
Assignee: Keith Packard
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-08 18:58 UTC by Allison Lortie (desrt)
Modified: 2008-12-28 03:07 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
fo file (594 bytes, application/xml)
2008-09-08 18:59 UTC, Allison Lortie (desrt)
Details
pdf file (4.80 KB, application/pdf)
2008-09-08 18:59 UTC, Allison Lortie (desrt)
Details
png file (52.12 KB, image/png)
2008-09-08 19:00 UTC, Allison Lortie (desrt)
Details

Description Allison Lortie (desrt) 2008-09-08 18:58:34 UTC
1) take the attached .fo file
2) run it through apache fop to get the attached .pdf file
3) open it in evince, kpdf and xpdf to get the attached .png file
4) note that xpdf is the expected result and the one that agrees with acrobat reader
Comment 1 Allison Lortie (desrt) 2008-09-08 18:59:03 UTC
Created attachment 18764 [details]
fo file
Comment 2 Allison Lortie (desrt) 2008-09-08 18:59:49 UTC
Created attachment 18765 [details]
pdf file
Comment 3 Allison Lortie (desrt) 2008-09-08 19:00:10 UTC
Created attachment 18766 [details]
png file
Comment 4 Albert Astals Cid 2008-09-10 13:34:29 UTC
I've no idea of which poppler version you are using, but anyways, this is not a bug.

The PDF has Courier NOT embedded in the file, so when rendering we have to ask the system for a font named Courier and draw what it gives us.

We are using Fontconfig for that and using poppler 0.9.0 i get the "correct" answer (n022003l.pfb), so if it does not for you, either update your poppler or fix your fontconfig to give the correct font when asking for Courier.
Comment 5 Allison Lortie (desrt) 2008-09-10 19:19:44 UTC
Some more information I managed to dig up (this seems to be the source of the problem):

desrt@moonpix:~$ fc-match Courier
n022003l.pfb: "Nimbus Mono L" "Regular"
desrt@moonpix:~$ fc-match Courier:spacing=0
n022024l.pfb: "Nimbus Mono L" "Bold Oblique"

Behdad says he can reproduce this so I'm reopening and reassigning.
Comment 6 Behdad Esfahbod 2008-12-28 02:25:22 UTC
For some reason the Nimbus Mono L Bold Oblique is not getting any spacing value detected for it, and that happens to better match 0 than the spacing=100 in the rest of them.  Investigating.
Comment 7 Behdad Esfahbod 2008-12-28 02:29:03 UTC
In fact the question is why does fontconfig detect spacing=100 (FC_MONO) for the three of them.
Comment 8 Behdad Esfahbod 2008-12-28 02:32:09 UTC
Sorry.  It's Mono after all, so detecting spacing=100 is correct.  It fails for Bold Oblique version though.

Another question I guess is, why does poppler request for spacing=0 instead of leaving that pattern field empty?
Comment 9 Behdad Esfahbod 2008-12-28 02:50:42 UTC
Glyph 227 of Nimbus Mono L Bold Oblique has a width much wider than the rest of the glyphs in the font (740 vs 600), so the font is detected as having proportional spacing, not mono spacing.
Comment 10 Behdad Esfahbod 2008-12-28 03:01:24 UTC
No idea if there's any upstream for urw-fonts.  Reported to Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=478332
Comment 11 Behdad Esfahbod 2008-12-28 03:07:32 UTC
Actually this was fixed in poppler earlier this year.  Poppler now doesn't set spacing unless it wants to ask for mono.  Dupping.

*** This bug has been marked as a duplicate of bug 14883 ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.