Bug 18126 - Times font substituted by Times-Bold
Summary: Times font substituted by Times-Bold
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: poppler-bugs
QA Contact:
Depends on:
Reported: 2008-10-19 20:17 UTC by Andrey V. Panov
Modified: 2018-08-20 22:01 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:

test pdf (56.60 KB, application/pdf)
2008-10-20 16:16 UTC, Andrey V. Panov
A tarball with my /etc/fonts contents (12.79 KB, application/x-tbz)
2008-10-24 13:43 UTC, Albert Astals Cid
screenshot xpdf vs okular (240.46 KB, image/png)
2008-11-17 05:22 UTC, Jacopo De Simoi
test case #2 (129.47 KB, application/pdf)
2008-11-17 05:22 UTC, Jacopo De Simoi

Description Andrey V. Panov 2008-10-19 20:17:56 UTC
Applications based on poppler 0.10 (evince, okular) for pdf files referring to but not embedding Times font substitute it with the Times-Bold font (namely Nimbus Roman No. 9 Bold). Nimbus Roman No. 9 L and Times New Roman are installed on system and known for fontconfig.
Comment 1 Albert Astals Cid 2008-10-20 12:09:42 UTC
I need a test pdf and it would be good if you pasted the output of 

fc-match Times
Comment 2 Andrey V. Panov 2008-10-20 16:16:08 UTC
Created attachment 19775 [details]
test pdf

$ fc-match Times
timR12-ISO8859-1.pcf.gz: "Times" "Regular"

Bitmap fonts are enabled.
Comment 3 Albert Astals Cid 2008-10-21 13:38:10 UTC
There is no Times font in this pdf, there is


that i get substituted to


That seems the correct substitution to me, if it doesn't work this way for you it might be a fault of your fontconfig configuration.

My fontconfig configuration has a 


Can you check if that fixes the problem for you?

If so, you should close this but and ping your distribution to add this alias.
Comment 4 Andrey V. Panov 2008-10-23 19:21:01 UTC
I have standard configuration files of fontconfig 2.6.0. It defines in 30-metric-aliases.conf (which has symlink to /etc/fonts/conf.d) following aliases:

        <alias binding="same">
          <family>Nimbus Roman No9 L</family>

          <family>Times New Roman</family>

          <family>Times New Roman</family>

With this configuration:
$ fc-match "Nimbus Roman No9 L"
n021004l.pfb: "Nimbus Roman No9 L" "Medium"

After that I have made symlink 70-no-bitmaps.conf to /etc/fonts/conf.d
$ fc-match Times-Roman
n021004l.pfb: "Nimbus Roman No9 L" "Medium"

but still evince linked with poppler 0.10 replaces Times-Roman with bold font.

Your configuration element added to ~/.fonts.conf has not changed anything.
Comment 5 Albert Astals Cid 2008-10-24 13:43:57 UTC
Created attachment 19855 [details]
A tarball with my /etc/fonts contents

Can you test if using this configuration makes it work?
Comment 6 Andrey V. Panov 2008-10-26 22:25:43 UTC
I have the same result with your configuration. 

P.S. Your configuration makes warning on my computer:

Fontconfig warning: "/etc/fonts/conf.d/53-monospace-lcd-filter.conf", line 17: invalid constant used : lcdfilterlegacy
Comment 7 James Cloos 2008-10-28 07:19:02 UTC
> Fontconfig warning: "/etc/fonts/conf.d/53-monospace-lcd-filter.conf", line 17:
> invalid constant used : lcdfilterlegacy

You need fontconfig 2.6.0 for that (it was added between 2.5.91 and 2.5.92).
Comment 8 Albert Astals Cid 2008-10-28 15:09:00 UTC
I need to test fontconfig 2.6 then i'm actually using 2.5 hope to get some free time soon
Comment 9 Jacopo De Simoi 2008-11-17 05:22:04 UTC
Created attachment 20368 [details]
screenshot xpdf vs okular
Comment 10 Jacopo De Simoi 2008-11-17 05:22:32 UTC
Created attachment 20369 [details]
test case #2
Comment 11 Jacopo De Simoi 2008-11-17 05:35:50 UTC
Here is a screenshot and another test case. 
I am running poppler 0.10.1 compiled from source (gentoo on amd64) and fontconfig 2.6.0
the provided /etc/fonts does not make any difference to me (and still produces a warning)
Moreover there are some issues also when zooming in the document, sometimes the font appear somehow "condensed" (you can see what I mean in the screenshot: at the end of the "Preface" line there is a "vi" which is rendered "condensed"). Sometimes (for a specific zoom value), the page is half rendered with the "condensed" font and half with the bold font, but I am currently not able to reproduce that (maybe it was fixed from 0.10.0->0.10.1). I am not sure if this is related or unrelated.
Andrey, did you notice that as well by any chance?

gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.0.2)
CFLAGS="-mtune=k8 -O2 -pipe -ggdb " #nothing fancy here
Comment 12 Andrey V. Panov 2008-11-17 21:43:06 UTC
For me the text always is displayed with Times-Bold or Times-BoldItalic. I have not condensed Times typefaces.
Comment 13 Jacopo De Simoi 2008-11-19 07:25:46 UTC
(In reply to comment #12)
> For me the text always is displayed with Times-Bold or Times-BoldItalic. I have
> not condensed Times typefaces.

Ok, this sometimes happened when zooming-unzooming, but it might have been fixed now.
Comment 14 Jacopo De Simoi 2008-11-19 17:33:16 UTC
(In reply to comment #3)
> There is no Times font in this pdf, there is
> Times-Bold
> Times-BoldItalic
> Times-Italic
> Times-Roman
> that i get substituted to
> n021004l.pfb
> n021024l.pfb
> n021023l.pfb
> n021003l.pfb
For me they get substituted to:

 n021024l.pfb <- Bold Italic
 n021004l.pfb <- Bold 

Same for you Andrey?
Comment 15 Jacopo De Simoi 2008-11-19 18:21:02 UTC
Apparently the problem is that somehow the Nimbus font reports "Medium" as the default weight, see 


for a workaround. 
This solved the issue for me.

Comment 16 Carl Michal 2009-02-25 16:16:35 UTC
The real cause of this problem appears to be with the n021004l.pfb font.  I have two versions of this font installed, one came with gentoo's urw-fonts package, and its ok.  The other version is ancient (2002) and was installed with gnu-gs-fonts-std-8.11 apparently distributed by cups.  This one is the problem, and appears to have incorrect metadata in it.  Replacing the bad one with the good one solves the problem.
Comment 17 Andrey V. Panov 2009-02-25 17:02:24 UTC
Nimbus Roman No. 9 family has two weights: "Regular" an "Medium". According to http://www.microsoft.com/typography/OTSpec/os2.htm "Regular" is identical to "Normal" font face, "Medium" is something more black.
Comment 18 Albert Astals Cid 2009-09-02 11:59:17 UTC
poppler 0.11.3 compiled from sources and fontconfig 2.6.0-1ubuntu12

Times-Italic -> /usr/share/fonts/X11/Type1/n021023l.pfb
Times-Bold -> /usr/share/fonts/X11/Type1/n021004l.pfb
Times-Roman -> /usr/share/fonts/X11/Type1/n021003l.pfb
Times-BoldItalic -> /usr/share/fonts/X11/Type1/n021024l.pfb

Can i assume the bug is fixed or still fails for you?
Comment 19 Paul Bredbury 2010-03-22 22:39:45 UTC
comment #16 (old, bad n021004l.pfb being to blame) is confirmed in http://bbs.archlinux.org/viewtopic.php?id=93521

So the problem, if any, is distros packaging an old, bad version of URW fonts.
Comment 20 GitLab Migration User 2018-08-20 22:01:19 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/160.

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.