Ghostscript / CUPS-PDF default font problem

Helge Blischke h.blischke at acm.org
Tue Dec 22 07:00:38 PST 2009


Chris wrote:

[...]
> 
> I was under the impression that CUPS-PDF used Ghostscript by default in
> it's PDF conversions.  My ultimate goal is to be able to print
> cross-platform searchable PDF files from an LPR text stream.  Am I going
> about this the wrong way?
> 
> Both of the PPD files that were used to generate the PDFs have Courier set
> as their default font.  I see no mention of FreeMono in the PPD files, (I
> realize that FreeMono is probably the substitution for Courier in Ubuntu
> Linux). I have Courier-New Installed on my Linux system, however, the
> system keeps defaulting to FreeMono. Is there any way to force a change to
> Courier? If I can't change the default font, is there any way to give the
> FreeMono font the information it will need to work in a cross platform
> environment?
> 
> Thanks,
> Chris

After installing GNU's freefont package, including the FreeMono family, I 
looked at the FreeMono font using the FontForge application (what is, BTW, 
the tool ghe GNU people use to edit their free fonts) and found that the 
font(s) _do_ contain the needed glyph table(s). And, generating a simple PDF 
using the FreeMono font by Ghostscript (8.64 in my case) turned out to be 
searchable.

Then, looking into both of your PDFs again and digging a lot deeper than 
before, it turned out that they both are generated from a PostScript file 
with a subset of the FreeMono font already embedded in a manner which I know 
from the Windows PSCRIPT driver: the glyphs are named "cxy" where xy is the 
hex value of the character code the PS creating application used. E.g. the 
digit "1" is named "c14" in both of your PDFs instead of "one". Thus, 
neither searching nor cut & paste can work properly.

Perhaps you can post (an URL to) the PostScript file the PDFs are created 
from and explain the chain of tools used in your PDF workflow in more 
detail?

Helge





More information about the cups mailing list