Two weird font problems when printing in KDE

James Richard Tyrer tyrerj at
Fri Sep 5 05:59:16 BST 2003

Andrew de Quincey wrote:
> Hi, I'm using KDE 3.1.3 (qt 3.1.2) on mandrake cooker. However, these problems 
> has always been with me back when I switched to linux completely with 
> mandrake 9.0.
> Problem 1)
> I'm using the microsoft TTF font Tahoma with freetype with full hinting 
> enabled. Tahoma looks fine onscreen, so this is not a freetype problem.
> However, if I use the Tahoma font in any KDE application... say I create a 
> file in kword with the string "this is a test", and print it, I end up with a 
> different font.
> I printed to a postscript file, and examined it. For some reason the font is 
> being changed to "LuxiSans" by KDE/Qt when I print it. Printed output also 
> has a different font substituted.
> This ONLY affects Tahoma, all other fonts are fine. 

Have you tried: "Courier New"?

> It sounds like there is something hardcoded somewhere.

You using Qt-3.1.2. So, this is NOT a hardcoded problem.

> The creator of printed PS files is set to "Qt 3.1.2", so this is not a 
> ghostscript problem.
You may if you built Qt from source, try my patch and see if it helps:

and see if this fixes it since it works for me with the patch applied.

There is also a possibility that it is Xft[2] or FreeType2.  Do you have 
the latest versions of both of these?

> Problem 2)
> This is separate from problem 1. Whenever I print a document to PS using any 
> TTF font:
> If I choose "embed fonts in document", the output is AWFUL. The letters are 
> all blurry.
Currently Qt converts TrueType to Type3 when it embeds.  Currently the only 
solution is not to embed, if you have GhostScript set up correctly.

However, you also need to check and see that it is using the correct font 
to embed.

> If I deselect "embed fonts in document", the output looks fine. However this 
> causes problems when I try to print the document to a real printer as I don't 
> necessarily have the full set of fonts on my print server.

Could you provide some additional information about your "print server"?

Specifically, are you printing on a printer connected directly to your 

Are you using CUPS?  It has serious problems with fonts.  But, you should 
be able to configure it for everything except fonts installed in $HOME.

If on a network, do you have FontConfig and NFS setup to serve the fonts?

Do you use GhostScript to print? or do you have a PostScript printer?

> The same goes for printing to a PDF BTW.
> These two problems are the only real irritation using KDE for me. 

Yes!  I had print problems as well.  I think that by hacking Qt and my 
print filter that they are fixed.  If you have a network or are using CUPS 
this may be a little harder.


This message is from the kde mailing list.
Account management:
More info:

More information about the kde mailing list