bohoomil / fontconfig-ultimate

freetype2-infinality run-time settings => infinality compatible fontconfig => infinality-bundle
453 stars 38 forks source link

Missing Fonts in pdf #52

Closed flamusdiu closed 9 years ago

flamusdiu commented 9 years ago

Using xpdf to open pdfs (also Noticed bad rendering in Chrome-Beta as well). I am getting the following errors:

Config Error: No display font for 'Courier'
Config Error: No display font for 'Courier-Bold'
Config Error: No display font for 'Courier-BoldOblique'
Config Error: No display font for 'Courier-Oblique'
Config Error: No display font for 'Helvetica'
Config Error: No display font for 'Helvetica-Bold'
Config Error: No display font for 'Helvetica-BoldOblique'
Config Error: No display font for 'Helvetica-Oblique'
Config Error: No display font for 'Symbol'
Config Error: No display font for 'Times-Bold'
Config Error: No display font for 'Times-BoldItalic'
Config Error: No display font for 'Times-Italic'
Config Error: No display font for 'Times-Roman'
Config Error: No display font for 'ZapfDingbats'
Syntax Error: Couldn't find a font for 'Helvetica'
Syntax Error: Couldn't find a font for 'Helvetica'
Syntax Error: Couldn't find a font for 'Helvetica'
Syntax Error: Couldn't find a font for 'Helvetica'
Syntax Error: Couldn't find a font for 'Helvetica'
Syntax Error: Couldn't find a font for 'Helvetica'
Syntax Error: Couldn't find a font for 'Helvetica'
Syntax Error: Couldn't find a font for 'Helvetica'
Syntax Error: Couldn't find a font for 'Helvetica'
Syntax Error: Couldn't find a font for 'Helvetica'
Syntax Error: Couldn't find a font for 'Helvetica'
Syntax Error: Couldn't find a font for 'Helvetica'
Syntax Error: Couldn't find a font for 'Helvetica'
Syntax Error: Couldn't find a font for 'Helvetica'

[Resolved] Switched from xpdf to zathura or mupdf fixes the issue.

bohoomil commented 9 years ago

Could you share the PDF document, please?

Chrome-Beta -- describe the problem further: "bad rendering" is anything and everything I can think of.

flamusdiu commented 9 years ago

I think Chrome-beta just picks fonts when it fails so its bad. The letters are just look horrible. However, I think if the issue with the fonts get's fixed, Chrome would render it properly.

Here's the pdf: http://www.sans.org/reading-room/whitepapers/policyissues/information-security-policy-development-guide-large-small-companies_1331

flamusdiu commented 9 years ago

What the heck; on my laptop it works. Let me see what the world is going on with my desktop.

bohoomil commented 9 years ago

Thanks a lot.

I just wanted to write the same: the file is rendering just fine for me. I think your problem must be pretty trivial: the free preset isn't set correctly. What is the output of fc-presets check and fc-match Arial?

flamusdiu commented 9 years ago

This is from my desktop

$ fc-presets check
 [ combi ] is not set 
 :: Run <fc-presets help> for more information.

 5 symlinks found.
 The active preset seems to be [ free ].
 Checking symlinks now...

30-metric-aliases-free.conf is OK
37-repl-global-free.conf is OK
60-latin-free.conf is OK
65-non-latin-free.conf is OK
66-aliases-wine-free.conf is OK
$ fc-match Arial
LiberationSans-Regular.ttf: "Liberation Sans" "Regular"

screenshot - 110514 - 21 07 15

flamusdiu commented 9 years ago
$ fc-match Courier
Courier Prime.ttf: "Courier Prime" "Regular"
$ fc-match Helvetica
LiberationSans-Regular.ttf: "Liberation Sans" "Regular"
bohoomil commented 9 years ago

It's xpdf. Switch to zathura and your problems should be gone.

flamusdiu commented 9 years ago

@bohoomil why would it work on one computer and not another one? How well does zathura work in XFCE4?

bohoomil commented 9 years ago

Zathura works in any environment. It is a minimalist document viewer for pdf, dvi and ps files which offers way better rendering quality than xpdf. Xpdf is quite a dated concept: replacing it with a more recent and robust solution would be a good idea anyway.

I've just checked out epdfview, which is also a very lightweight application, but unfortunately it wasn't able to display images in your document. On the other hand, Evince is working nicely with it and has a more traditional UI than zathura. All three use the same rendering backend, poppler. If you want, you can try mupdf, which some people find a better bet than poppler. All of them (and more) you'll find in the official Arch repos.

I'm not really sure why Xpdf behaves differently on two machines. I assume they both share identical font setups: if not sure, you can backup /etc/fonts on the not-working one and replace it with the other's. A broken symlink or an accidentally missing config file (30-metric-aliases-free.conf?) seem to be the most probable reasons.

flamusdiu commented 9 years ago

@bohoomil Yeah, I've looked at the ones on the Arch Wiki (love that site). As for traditional UI, I don't mind if it does or doesn't. I just prefer a lightweight one. Have you used mupdf?

flamusdiu commented 9 years ago

@bohoomil So, I installed both zathura and mupdf. Looks like zathura can use the mupdf backend so installed that as well. I don't see much in the different of UI between the two other then zathura seems to have continuous scrolling where mupdf does not. Is there any easy way to open a pdf when you have zathura open?

bohoomil commented 9 years ago

I did test mupdf long ago and the only reason I got back to poppler was incorrect rendering of several diacritics in the former (actually, several missing national characters in certain pdf files). Today this might not be the case any more: I'll need to install mupdf backend for zathura and check it again, though.

Indeed, both viewers have a similar, very simple UI. You'll need to check the man page for more info about navigation and configuration. In zathura when you press : and then [tab] key, you'll get a list of available commands, i.e. :open [tab] will give you the list of pdf files in the current directory. Optionally, zathura can be used with tabbed, so you can open multiple documents in new tabs. I don't need this particular feature myself, but some find it really handy.

BTW, when you set zathura as the default pdf viewer, you can launch it when you click on a pdf file (each document will be opened in a new window). I'm using it with mc & vim (to preview XeLaTeX output) and everything just works as expected.

flamusdiu commented 9 years ago

@bohoomil ahh, gotcha. Umm, I skimmed the documentation on zathura but seemed I missed the : + [tab] combo. tabbed might be useful since I have been reading a lot of pdfs for school.

Do you have an examples of the diacritics not rendering properly? Not sure if this would effect me too much though.

bohoomil commented 9 years ago

No, unfortunately not. As far as I can remember, the problems I mentioned were restricted to ISO-8859-2 code page, which covers Central European scripts. Others, including UTF-8 standard, were unaffected. mupdf has been updated many times since and the issue may be long fixed already. The good thing about zathura is that you can always change the rendering engine, while everything else -- including UI and the like -- will remain the same. Pretty handy. All in all, you don't have to worry about it too much because there is a trivial way to get things back to the working state. The vast majority of documents are rendered correctly in both mupdf and poppler, and for most infinality-bundle users (including myself) pdfs are a daily bread.

flamusdiu commented 9 years ago

Gotcha. I'll have to play with tabbed more. Seems a few issues with trying to get it to work but nothing that's going to kill me. Thanks for the information and answers. =)

[Resolved] Switched from xpdf to zathura or mupdf fixes the issue.