Bug 128912 - Printing by All KDE Applications is bad
Summary: Printing by All KDE Applications is bad
Status: RESOLVED FIXED
Alias: None
Product: koffice
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KDEPrint Devel Mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-09 20:25 UTC by Mohd Asif Ali Rizwaan
Modified: 2009-10-17 19:34 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
As you can see the Fonts are not aliased and bytecode is enabled for that. (54.52 KB, image/jpeg)
2006-06-10 16:38 UTC, Mohd Asif Ali Rizwaan
Details
I have bytecode compiled in. can be seen in the screenshot. so it's not a ONE System's/Person's problem. (126.00 KB, image/jpeg)
2006-06-10 21:46 UTC, Mohd Asif Ali Rizwaan
Details
I have bytecode compiled in. can be seen in the screenshot. so it's not a ONE System's/Person's problem. (126.00 KB, image/jpeg)
2006-06-10 21:47 UTC, Mohd Asif Ali Rizwaan
Details
Test Case - a tar.bz2 file - contains PDF and How to Reproduce text. (280.16 KB, application/x-tbz)
2006-06-11 00:18 UTC, Mohd Asif Ali Rizwaan
Details
Printout from KMail (23.50 KB, application/pdf)
2009-08-22 02:15 UTC, Thomas Zell
Details
Zoom into printout from KMail (3.56 KB, image/png)
2009-08-22 02:15 UTC, Thomas Zell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mohd Asif Ali Rizwaan 2006-06-09 20:25:42 UTC
Version:           unknown (using KDE 3.5.3, Frugalware Linux)
Compiler:          Target: i686-pc-linux-gnu
OS:                Linux (i686) release 2.6.16-fw5

I thought it was just KOffice which has bad truetype printing, but later I discovered that All KDE applications print bad (just try kwrite/kate with Times New Roman). The TrueType fonts used are printed badly. But Postscript fonts are printed nicely by KDE PRINT SYSTEM. The same True Type Font when converted and installed as postscript font (.pfb) the printout is great!

Possible Solutions (for better printing):

A. Visually Good and Printing Good (Win-Win solution)
   a) Remove all TTF fonts (esp. when Antialiasing is used in "kcmshell fonts")
   1. creating .PFB fonts with ttf2pt1 (syntax: ttf2pt1 -b <fontname.ttf>)
   2. and installing only the .PFB fonts will print the text nicely.
   3. and the display will not look bad either.
   
If both TTF and PFB are installed then KDE Print system uses TTF for embedding (even though we created/installed .PFB postscript fonts) hence causing UGLY printouts with any KDE application, including kwrite, kword ...

If we remove TTF (and use converted pfb fonts) then the printouts are great! 

B. Visually BAD but Printing Good (X antialiased turned off) (Lose-Win solution)
   1. installing .pbf will get good printouts but X Display font look ugly.


C. Visually Good Printing Good (Half Win-Win Lose-Lose solution)

A) KDE System should Manage Fonts dynamically.
1. We should Installing/Enabling The TTF files which are used for Display only. and the remaining TTF should be removed/replaced with .PFB files.
2. Installing/Enabling The PFB files for Printing.

B) User should manual install TrueType Fonts for his/her display and install fonts required for printing. like Verdana for display, times new roman, arial, etc., as .pfb for printing.


Expected Behavior:
-----------------
The Print System should prefer (give priority) to existing .pfb postscript fonts instead of TTF truetype fonts for better printing with KDE applications.

For printing -> pfb should be used.
For Display -> ttf should be used.

When both ttf and pfb are installed printout look ugly. removing ttf gets better printout with the same font converted to pfb is installed (alone).

It will take a Year or so, for QT4 and KDE 4 to come out for better printing ability. Till then Will KDE suffer for printing, why can't QT3 be patched/fixed for this kerning thing?
Comment 1 Thomas Zander 2006-06-10 08:33:24 UTC
When rizwaan says type1 fonts print better he means that he just installed a pfb and no pfm kerning file.
So, in effect he turned off kerning and now has better printing. Which isn't all that surprising and points to problems in his freetype. Specifically; BCI does not seem to be enabled.
Search the net for "bytecode freetype" to get more info.
Comment 2 Mohd Asif Ali Rizwaan 2006-06-10 16:38:21 UTC
Created attachment 16550 [details]
As you can see the Fonts are not aliased and bytecode is enabled for that.

I installed .pfb and .afm files. and I also compiled freetype with bytecode
interpreter enabled in freetype-2.2/config/ftoptions.h

The screenshot shows that the bytecode is compiled in. A software patent is
bullshit in Asia and Europe. Just turn off your antialiasing and see jagged
fonts (if bytecode is not compiled in).
Comment 3 Mohd Asif Ali Rizwaan 2006-06-10 21:06:11 UTC
>When rizwaan says type1 fonts print better he means that he just installed a pfb and no pfm kerning file. 

Okay dude, I installed .pfm for the truetype font, created using Fontlab 5 in windows. 

I tried with:

1. ttf + pfm = crappy printout
2. ttf + AFM + PFB  = crappy printout
3. PFB+AFM = good printout
4. PFB+AFM+PFM = good printout
5. pfm only = Font not detected so no printout

What made you think that PFM+TTF+PFB will get a good printout?

Anyhow, if TTF installed will not get good prints! 

What a shame that KDE Print System don't know how to use afm/pfb/pfm when both TTF and type1 fonts are installed. And you are asking All 12,000 KDE desktops to remain shameful till KDE 4 (any release date?). see 12,000 desktops migrated to KDE -> http://dot.kde.org/1149886049.

And QTConfig doesn't help either! Disabling the Embedding will not print anything, even print preview is blank without font embedding!
Comment 4 Mohd Asif Ali Rizwaan 2006-06-10 21:46:21 UTC
Created attachment 16553 [details]
I have bytecode compiled in. can be seen in the screenshot. so it's not a ONE System's/Person's problem.

>Which isn't all that surprising and points to problems in his freetype.
Specifically; BCI does not seem to be enabled. 
Don't try to make it a joe user's problem. The Whole of KDE can't handle TTF
for nice printing. At least name a distro which can print nicely using KDE
Print System! I will try that. 
It is surprising indeed that KDE devs has been ignoring and stalling KDE Print
Issues with TTF which is one of the most important aspects of a Desktop and
that is printing.

> Search the net for "bytecode freetype" to get more info. 
Did the search. and found that bytecode i've been compiling it for several
years with every new release of freetype.
Comment 5 Mohd Asif Ali Rizwaan 2006-06-10 21:47:27 UTC
Created attachment 16554 [details]
I have bytecode compiled in. can be seen in the screenshot. so it's not a ONE System's/Person's problem.

>Which isn't all that surprising and points to problems in his freetype.
Specifically; BCI does not seem to be enabled. 
Don't try to make it a joe user's problem. The Whole of KDE can't handle TTF
for nice printing. At least name a distro which can print nicely using KDE
Print System! I will try that. 
It is surprising indeed that KDE devs has been ignoring and stalling KDE Print
Issues with TTF which is one of the most important aspects of a Desktop and
that is printing.

> Search the net for "bytecode freetype" to get more info. 
Did the search. and found that bytecode i've been compiling it for several
years with every new release of freetype.
Comment 6 Mohd Asif Ali Rizwaan 2006-06-11 00:18:01 UTC
Created attachment 16555 [details]
Test Case - a tar.bz2 file - contains PDF and How to Reproduce text.

Please see in the attachment UGLY_printout.txt and Nice_Printout.txt 

also you can *see* UGLY_printout.PDF and Nice_Printout.PDF.

Please use KPDF for better clarity. Also please use 100% zoom and 200% zoom to
see the differences.

Thanks.
Comment 7 Christian Morales Vega 2006-06-11 15:32:21 UTC
I don't understand anything about fonts, but I can reproduce the problem.
But if I disable (translated from spanish) "System Options->Fonts->Include fonts in PS data when printing" in KDEPrint dialog the problem is solved ¿?¿?

Using Suse 10.1 with KDE 3.5.3 (QT 3.3.6)
Comment 8 Carlos Corbacho 2006-10-15 23:37:03 UTC
*** This bug has been confirmed by popular vote. ***
Comment 9 Kurt Pfeifle 2007-01-14 19:57:32 UTC
This bug is valid.

But it is not in the realm of KDEPrint to solve. KDEPrint does not *create* the printjob files it processes, and it doesn not embed (or not) fonts into the files.

KDEPrint has its own assortment of bugs :-)

Basically, what this bug report reflects are two facts:

  * the FOSS world and our users are missing a good set of Free and/or free
    quality fonts that display excellently on screen and on printed paper.

  * KDE and Qt (and the FOSS world) do not yet have an excellent mechanism
    of handling font details (kerning, auto-hinting, font substitutions where
    original font is missing).

Probably this one should be assigned to KOffice/KWord (as the trustee for this bug), so it can be kept in mind for the development of KOffice 2.0. (It names "all KDE applications" but we do not have such a module.)


Cheers,
Kurt

-----
Thomas, if you don't like this bug to spoil your statistics, feel free to give it back to KDEPrint to be the trustee. But we for sure can't create any code that would improve the printing quality of fonts.
Comment 10 Thomas Zander 2009-08-11 15:16:29 UTC
Qt4.x basically solved this issue. (oh, and much better fonts like the sil ones helped a lot!)
Comment 11 Thomas Zell 2009-08-22 02:14:25 UTC
While things might have improved, I'm still not very happy. Letters continue to be smashed together ... (see attached files)
Comment 12 Thomas Zell 2009-08-22 02:15:04 UTC
Created attachment 36343 [details]
Printout from KMail
Comment 13 Thomas Zell 2009-08-22 02:15:47 UTC
Created attachment 36344 [details]
Zoom into printout from KMail
Comment 14 Thomas Zell 2009-10-17 19:34:32 UTC
Can someone please explain to me, why or how this problem has been solved? The way I see this, the PDF/PS files produced by Qt 4.x still look bad and render very slowly (see my previous example).