[FIX] Font printing problems

James Richard Tyrer tyrerj at acm.org
Sat Aug 9 05:27:34 BST 2003


If you print from KDE applications using PostScript data and you have 
chosen NOT to embed the fonts, you have probably had problems.

You need to properly configure the fonts for GhostScrip for them to work. 
The directories must be either on the GS_LIB search path and have a Fontmap 
file in the directory, or be on the GS_FONTPATH search path if you don't 
have a Fontmap file.

The problem is that even if you have them properly configured, GhostScript 
does not find the fonts when you print.  This happens even though it *does* 
find the fonts when you use the print preview.

There are work arounds for this.

KDEFontInst currently has some work arounds built into it which may or may 
not fix the problem for you.

If you build GhostScript from source, you can build the GS_LIB (but not the 
GS_FONTPATH) into it and then it will always find fonts on the GS_LIB path. 
  But, this will not work for fonts installed in your home directory 
because: "$HOME" will not be expanded.

I have written two fixes for this.  I have posted these as patches for (1) 
KDE if you use LPR and (2) for ESPGhostSCript if you use CUPS.  These both 
work on my system.  The patches are at:

	http://bugs.kde.org/show_bug.cgi?id=59367

If you want to install these on not built from source systems, I have 
posted the two scripts:

"gsk" for LPR:  This works ONLY with GhostScript installed as SO.  Just use 
it as a wrapper for gsc.  That is have a link named: "gs" pointing to: 
"gsk" and set the paths to: "gsc" correctly if you didn't install in: 
"/usr/local/"

"pstoraster" is a replacement for the "pstoraster" script which is probably 
in: "/usr/lib/cups/filter/".  You may need the change: "prefix" and the 
name "gs" in line 88 if you gave GhostScript a different name.

They are available at:

http://home.earthlink.net/~tyrerj/files/gs-fix/

Unfortunately there is an additional problem.  Currently with Qt 3.x.y, the 
PostScript data files produced have the wrong font names.  This can be 
fixed by adding an alias to you: "Fontmap.GS" file in the GhostScript: 
"lib/" directory.  If you install them with the current (3.1.3) version of 
the KDEFontInst, it will create aliases for you an it will work in most 
cases except for really strange font names.

If you are using my scripts, I would like to hear from you.  You know, 
praise, accolades, grants, job offers, etc. ... :-D and those ever popular 
bug reports.

--
JRT

___________________________________________________
This message is from the kde mailing list.
Account management:  http://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.




More information about the kde mailing list