Bug#904164: Text of some PDF invisible: some font thing failed

2018-09-06 Thread Mathias Brodala
Hi,

After the last system updates the issue has appeared again and this time
I am not able to fix it via "fc-cache -f":

> $ fc-cache -fv
> /usr/share/fonts: caching, new cache contents: 0 fonts, 5 dirs
> /usr/share/fonts/X11: caching, new cache contents: 0 fonts, 5 dirs
> /usr/share/fonts/X11/100dpi: caching, new cache contents: 358 fonts, 0 dirs
> /usr/share/fonts/X11/Type1: caching, new cache contents: 8 fonts, 0 dirs
> /usr/share/fonts/X11/encodings: caching, new cache contents: 0 fonts, 1 dirs
> /usr/share/fonts/X11/encodings/large: caching, new cache contents: 0 fonts, 0 
> dirs
> /usr/share/fonts/X11/misc: caching, new cache contents: 89 fonts, 0 dirs
> /usr/share/fonts/X11/util: caching, new cache contents: 0 fonts, 0 dirs
> /usr/share/fonts/cMap: caching, new cache contents: 0 fonts, 0 dirs
> /usr/share/fonts/cmap: caching, new cache contents: 0 fonts, 5 dirs
> /usr/share/fonts/cmap/adobe-cns1: caching, new cache contents: 0 fonts, 0 dirs
> /usr/share/fonts/cmap/adobe-gb1: caching, new cache contents: 0 fonts, 0 dirs
> /usr/share/fonts/cmap/adobe-japan1: caching, new cache contents: 0 fonts, 0 
> dirs
> /usr/share/fonts/cmap/adobe-japan2: caching, new cache contents: 0 fonts, 0 
> dirs
> /usr/share/fonts/cmap/adobe-korea1: caching, new cache contents: 0 fonts, 0 
> dirs
> /usr/share/fonts/truetype: caching, new cache contents: 0 fonts, 6 dirs
> /usr/share/fonts/truetype/ancient-scripts: caching, new cache contents: 30 
> fonts, 0 dirs
> /usr/share/fonts/truetype/dejavu: caching, new cache contents: 6 fonts, 0 dirs
> /usr/share/fonts/truetype/freefont: caching, new cache contents: 12 fonts, 0 
> dirs
> /usr/share/fonts/truetype/kochi: caching, new cache contents: 4 fonts, 0 dirs
> /usr/share/fonts/truetype/liberation: caching, new cache contents: 16 fonts, 
> 0 dirs
> /usr/share/fonts/truetype/openoffice: caching, new cache contents: 1 fonts, 0 
> dirs
> /usr/share/fonts/type1: caching, new cache contents: 0 fonts, 1 dirs
> /usr/share/fonts/type1/gsfonts: caching, new cache contents: 35 fonts, 0 dirs
> /usr/X11R6/lib/X11/fonts: skipping, no such directory
> /usr/local/share/fonts: caching, new cache contents: 0 fonts, 0 dirs
> /home/me/.local/share/fonts: skipping, no such directory
> /home/me/.fonts: caching, new cache contents: 631 fonts, 0 dirs
> /usr/share/fonts/X11: skipping, looped directory detected
> /usr/share/fonts/cMap: skipping, looped directory detected
> /usr/share/fonts/cmap: skipping, looped directory detected
> /usr/share/fonts/truetype: skipping, looped directory detected
> /usr/share/fonts/type1: skipping, looped directory detected
> /usr/share/fonts/X11/100dpi: skipping, looped directory detected
> /usr/share/fonts/X11/Type1: skipping, looped directory detected
> /usr/share/fonts/X11/encodings: skipping, looped directory detected
> /usr/share/fonts/X11/misc: skipping, looped directory detected
> /usr/share/fonts/X11/util: skipping, looped directory detected
> /usr/share/fonts/cmap/adobe-cns1: skipping, looped directory detected
> /usr/share/fonts/cmap/adobe-gb1: skipping, looped directory detected
> /usr/share/fonts/cmap/adobe-japan1: skipping, looped directory detected
> /usr/share/fonts/cmap/adobe-japan2: skipping, looped directory detected
> /usr/share/fonts/cmap/adobe-korea1: skipping, looped directory detected
> /usr/share/fonts/truetype/ancient-scripts: skipping, looped directory detected
> /usr/share/fonts/truetype/dejavu: skipping, looped directory detected
> /usr/share/fonts/truetype/freefont: skipping, looped directory detected
> /usr/share/fonts/truetype/kochi: skipping, looped directory detected
> /usr/share/fonts/truetype/liberation: skipping, looped directory detected
> /usr/share/fonts/truetype/openoffice: skipping, looped directory detected
> /usr/share/fonts/type1/gsfonts: skipping, looped directory detected
> /usr/share/fonts/X11/encodings/large: skipping, looped directory detected
> /var/cache/fontconfig: not cleaning unwritable cache directory
> /home/me/.cache/fontconfig: cleaning cache directory
> /home/me/.fontconfig: not cleaning non-existent cache directory
> fc-cache: succeeded

An "fc-cat" run afterwards:

> $ fc-cat -v | grep Directory
> /usr/X11R6/lib/X11/fonts: No such file or directory
> /home/me/.local/share/fonts: No such file or directory
> Directory: /usr/share/fonts
> Directory: /usr/local/share/fonts
> Directory: /root/.fonts
> Directory: /usr/share/fonts/X11
> Directory: /usr/share/fonts/cMap
> Directory: /usr/share/fonts/cmap
> Directory: /usr/share/fonts/truetype
> Directory: /usr/share/fonts/type1
> Directory: /usr/share/fonts/X11/100dpi
> Directory: /usr/share/fonts/X11/Type1
> Directory: /usr/share/fonts/X11/encodings
> Directory: /usr/share/fonts/X11/misc
> Directory: /usr/share/fonts/X11/util
> Directory: /usr/share/fonts/cmap/adobe-cns1
> Directory: /usr/share/fonts/cmap/adobe-gb1
> Directory: /usr/share/fonts/cmap/adobe-japan1
> Directory: /usr/share/fonts/cmap/adobe-japan2
> Directory: /usr/share/fonts/cmap/adobe-korea1
> 

Bug#904164: Text of some PDF invisible: some font thing failed

2018-07-22 Thread Jason Crain
On Sun, Jul 22, 2018 at 10:57:24PM +0200, Mathias Brodala wrote:
> Jason Crain schrieb am 21.07.2018 um 20:51:
> > How does it look if you run `pdftocairo -png in.pdf out` to convert to
> > png images? pdftocairo is in the poppler-utils package. Evince uses
> > poppler for PDF rendering so that should get the same result as Evince.
> 
> Seems like there is something off, when I do that I get the following:
> 
> I/O Error: Cannot open '/root/.fonts/verdana.ttf'
> Syntax Error: failed to load truetype font<0a>
> some font thing failed
> 
> This is repeated at lot of times for "arial.ttf", "verdana.ttf" and
> "verdanab.ttf".
> 
> I have no idea why Evince/poppler suddenly thinks these fonts reside in
> /root/.fonts. They always where in /home//.fonts and I cannot remember
> the last time I ever changed something about this.

Poppler uses fontconfig to locate fonts so it sounds like there's
something wrong with fontconfig instead of poppler or evince.

There's a few things you can try like using `fc-cat -v` to inspect the
cache files or `fc-cache -f` to rebuild the cache.



Bug#904164: Text of some PDF invisible: some font thing failed

2018-07-21 Thread Jason Crain
On Sat, Jul 21, 2018 at 07:31:51PM +0200, Mathias Brodala wrote:
> Jason Crain schrieb am 21.07.2018 um 01:03:
> > What version of poppler and cairo are you using?
> 
> Currently installed are libpoppler74 (0.63.0-2) and libcairo2 (1.15.10-3).

That's weird because it's working fine for me using those versions.

How does it look if you run `pdftocairo -png in.pdf out` to convert to
png images? pdftocairo is in the poppler-utils package. Evince uses
poppler for PDF rendering so that should get the same result as Evince.

Is there some reason Evince would not be able to read font files, like
maybe you've moved them out of /usr/share/fonts?

AppArmor sometimes causes issues so try temporarily disabling apparmor
with `aa-disable /etc/apparmor.d/usr.bin.evince`. aa-disable is in the
apparmor-utils package.



Bug#904164: Text of some PDF invisible: some font thing failed

2018-07-21 Thread Mathias Brodala

Hi,

Jason Crain schrieb am 21.07.2018 um 01:03:

On Sat, Jul 21, 2018 at 12:22:47AM +0200, Mathias Brodala wrote:

today I noticed that Evince suddenly fails to render some PDF files properly
which however worked fine before. When launching from a terminal there are a
lot of lines repeated like this:


some font thing failed


Take the attached PDF as an example whose text is invisible (but can be
selected and copied) in Evince. The rendering is fine in Chromium however.


What version of poppler and cairo are you using?


Currently installed are libpoppler74 (0.63.0-2) and libcairo2 (1.15.10-3).

Please let me know if you need something else/specific.

Regards, Mathias



Bug#904164: Text of some PDF invisible: some font thing failed

2018-07-20 Thread Jason Crain
On Sat, Jul 21, 2018 at 12:22:47AM +0200, Mathias Brodala wrote:
> today I noticed that Evince suddenly fails to render some PDF files properly
> which however worked fine before. When launching from a terminal there are a
> lot of lines repeated like this:
> 
> > some font thing failed
> 
> Take the attached PDF as an example whose text is invisible (but can be
> selected and copied) in Evince. The rendering is fine in Chromium however.

What version of poppler and cairo are you using?