Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Enthusiast
    Join Date
    Dec 2011
    Turtle Island West

    xpdf cannot find any fonts

    I got sick of acroread. It doesn't scroll with the mouse, it takes too long to fire up, even after you close the window it still leaves one hanging around (just in case?), you have to click in the window first before it does anything, and last, but certainly not least, it's proprietary and I do not have the source code to tweak. It's anti-linux, but it's all I had until recently.

    I got xpdf source and compiled it. It complained about freetype, so I got it and compiled it. I already had freetype, but it wanted it's OWN freetype. I had to show it where the freetype source code was for it to compile. Fine, but odd. It's picky about rendering fonts. Good thing, I'm thinking. Now I have fresh new freetype libs in /usr/local/lib. I already have them in /usr/X11R6/lib. I also have some lounging around in /usr/lib for some reason. The latter two are ancient, from the original install in 2005.

    xpdf compiles nice and runs nice, beefs on exit about
    Warning: XtRemoveGrab asked to remove a widget not on the list
    Hmmm? Let's look at it. Line 1042,
      // this is magic (taken from DDD) - weird things happen if this
      // call isn't made (this is done in two different places, in hopes
      // of squashing this stupid bug)
      XtUngrabButton(core->getDrawAreaWidget(), AnyButton, AnyModifier);
    I'm not so sure about that, but hey, I can always send stderr to /dev/null. Let's keep moving.

    I fired up some comic books, had a laugh, and I love the way xpdf is *very* customizable. Awesome. Spent a bit of time tweaking ~.xpdfrc to my liking, very impressed. Works great. So far.

    The next day, I check out a pdf off the net. This one is all text, the last one was all graphics. FAIL. No fonts. Nothing.
    Syntax Error: Couldn't create a font for 'BAAAAA+ArialMT'
    Syntax Error: Couldn't create a font for 'CAAAAA+Thorndale'
    Blah blah blah they scroll off the screen.

    I don't know about you, but I've never even heard of 'Thorndale' font. This should be compiled into the pdf, and I know it is, otherwise what is the point of pdf to begin with. Portable Document Format. The fonts are in the doc itself. Acroread can do it, with it's crappy little stash of 10 common fonts. WTF is going on.

    So I play around xpdfrc a bit more, making entries likes this:
    fontFile Arial                  /usr/X11R6/lib/X11/fonts/drakfont/ttf/arial.ttf
    fontFile Arial,Bold             /usr/X11R6/lib/X11/fonts/drakfont/ttf/arialbd.ttf
    fontFile Arial,BoldItalic       /usr/X11R6/lib/X11/fonts/drakfont/ttf/arialbi.ttf
    fontFile Arial,Italic           /usr/X11R6/lib/X11/fonts/drakfont/ttf/ariali.ttf
    fontFile BAAAAA+ArialMT         /usr/X11R6/lib/X11/fonts/drakfont/ttf/arial.ttf
    fontDir         /usr/X11R6/lib/X11/fonts
    fontDir         /usr/X11R6/lib/X11/fonts/TTF
    fontDir         /usr/X11R6/lib/X11/fonts/drakfont/ttf
    fontDir         /usr/X11R6/lib/X11/fonts/drakfont/Type1
    fontDir         /usr/local/share/ghostscript/8.01/Resource/Font
    fontDir         /usr/lib/Acrobat5/Resource/Font
    To no avail. I start thinking, is it even reading the config file? I know that it reads the one in my home dir, so I include /usr/local/etc/xpdfrc in ~/.xpdfrc.

    Still nothing. So I hexedit xpdf and, yes, indeed, '/usr/local/etc/xpdfrc' is hard-coded into it. OK. Odd. But fine.

    So I remove the conflicting ancient versions of freetype, ldconfig, still nothing. I realize my PC has been running for 3 weeks with me hacking at it, so I reboot.

    Now I have funny looking fonts everywhere in X, and xpdf still doesn't do fonts.

    Yes, I can reverse the changes I made, and I undoubtedly will, because the grisly font I'm looking at while I type this is unacceptable, but...

    What's the issue?

  2. #2
    Linux Enthusiast
    Join Date
    Dec 2011
    Turtle Island West
    Much apologies about that rant yesterday, but I had spent a good part of the day trying to fix the problem without success. And it is certainly not the first time I've had frustrating font issues.

    Anyway, I solved the problem.

    1. Install t1lib, t1lib-devel, and anything else t1lib related.

    2. Reconfigure and recompile freetype2. Make install.

    3. Reconfigure and recompile xpdf. Make install.

    It works! No font is beyond it's mighty power now!

    Peace and cheer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts