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.
I need a test pdf and it would be good if you pasted the output of fc-match Times
Created attachment 19775 [details] test pdf $ fc-match Times timR12-ISO8859-1.pcf.gz: "Times" "Regular" Bitmap fonts are enabled.
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 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 <alias> <family>Times-Roman</family> <accept><family>NimbusRomNo9L-Regu</family></accept> </alias> 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.
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> <default> <family>Times</family> </default> </alias> <alias> <family>Times</family> <default> <family>Times New Roman</family> </default> </alias> <alias> <family>Times</family> <default> <family>Times New Roman</family> </default> </alias> 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 now $ 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.
Created attachment 19855 [details] A tarball with my /etc/fonts contents Can you test if using this configuration makes it work?
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
> 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).
I need to test fontconfig 2.6 then i'm actually using 2.5 hope to get some free time soon
Created attachment 20368 [details] screenshot xpdf vs okular
Created attachment 20369 [details] test case #2
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
For me the text always is displayed with Times-Bold or Times-BoldItalic. I have not condensed Times typefaces.
(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.
(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: n021004l.pfb n021024l.pfb n021024l.pfb <- Bold Italic n021004l.pfb <- Bold Same for you Andrey?
Apparently the problem is that somehow the Nimbus font reports "Medium" as the default weight, see http://bugs.archlinux.org/task/10593?dev=179 for a workaround. This solved the issue for me. Jacopo
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.
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.
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 #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.
-- 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.