Bug 67950 - poor and incorrect font rendering
Summary: poor and incorrect font rendering
Status: RESOLVED FIXED
Alias: None
Product: kpdf
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Christophe Devriese
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-12 01:59 UTC by Sean Clarke
Modified: 2004-09-09 19:20 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
bad ttf rendering for kpdf/gpdf (50.88 KB, image/png)
2004-02-06 14:44 UTC, FACORAT Fabrice
Details
Example of improper rendering (55.87 KB, image/png)
2004-02-15 19:19 UTC, Matej Cepl
Details
Example of correct rendering (50.05 KB, image/png)
2004-02-15 19:20 UTC, Matej Cepl
Details
Example PDF file (34.10 KB, application/pdf)
2004-02-15 19:27 UTC, Matej Cepl
Details
Original document. (14.56 KB, application/x-kword)
2004-02-25 08:04 UTC, Brandon Nuttall
Details
PDF created by Kword. (33.99 KB, application/pdf)
2004-02-25 08:04 UTC, Brandon Nuttall
Details
PDF created by OpenOffice. (27.90 KB, application/pdf)
2004-02-25 08:05 UTC, Brandon Nuttall
Details
Screenshot of incorrect rendering of Kword pdf. (180.46 KB, image/png)
2004-02-25 08:10 UTC, Brandon Nuttall
Details
Screenshot of incorrect rendering of OO pdf. (235.80 KB, image/png)
2004-02-25 08:11 UTC, Brandon Nuttall
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Clarke 2003-11-12 01:59:05 UTC
Version:            (using KDE KDE 3.1.93)
Installed from:    SuSE RPMs
OS:          Linux

Kpdf renders fonts incorrectly (font type and spacing etc.), misses out formatting (bold text etc.) and sometimes fails to render complete pages.

May be related to bug #67482

I can supply files if needed.
Comment 1 Sean Clarke 2003-12-09 01:56:55 UTC
Can confirm same behavour in KDE 3.2 beta 2
Comment 2 Gilles Schintgen 2003-12-24 13:44:14 UTC
The fonts are all wrong in this one:
http://www.kofler.cc/pdf/linux4_emacsprg.pdf
xpdf and kghostview have no problems.
I am also using beta2.
Comment 3 Vincent Wagelaar 2004-01-05 03:12:41 UTC
Same problem here on debian kdecvs from yesterday. Looks like every font is rendered in Helvetica. Works fine in xpdf.
Comment 4 Christophe Devriese 2004-01-10 05:35:49 UTC
Can you test this patch ? (it basically adds "f.setFamily(fname);" after setStyleHint in kpdf/QOutputDev.cpp

Index: QOutputDev.cpp
===================================================================
RCS file: /home/kde/kdegraphics/kpdf/kpdf/QOutputDev.cpp,v
retrieving revision 1.11
diff -r1.11 QOutputDev.cpp
149,152c150,154
<     f. setStyleHint ( sty, (QFont::StyleStrategy) ( QFont::PreferOutline | QFont::PreferQuality ))
<     f. setBold ( gfxFont-> isBold ( ) > 0 );
<     f. setItalic ( gfxFont-> isItalic ( ) > 0 );
<     f. setFixedPitch ( gfxFont-> isFixedWidth ( ) > 0 );
---
>     f.setStyleHint ( sty, (QFont::StyleStrategy) ( QFont::PreferOutline | QFont::PreferQuality ));
>     f.setBold ( gfxFont-> isBold ( ) > 0 );
>     f.setItalic ( gfxFont-> isItalic ( ) > 0 );
>     f.setFixedPitch ( gfxFont-> isFixedWidth ( ) > 0 );
>     f.setFamily(fname);
Comment 5 Sean Clarke 2004-01-10 11:30:01 UTC
I'd like too, however I don't presently have the HD space too do much compiling.

Vincent & Giles: Are you in a position to test the patch?
Comment 6 Gilles Schintgen 2004-01-10 18:13:37 UTC
Not right now, I've got exams. I'll try as soon as possible but don't expect it for the next two weeks. Sorry.
Comment 7 Gilles Schintgen 2004-01-11 10:27:42 UTC
A little break can't hurt ;-)
Unfortunately the patch doesn't help. Did it work for you, Christophe?
I just tried some more .pdfs and I have trouble finding one that uses the right fonts!? It seems to me that kpdf always uses the standard postscript fonts instead of those specified by the document. All the tested files are rendered correctly by xpdf and kghostview.
Comment 8 FACORAT Fabrice 2004-02-06 14:41:13 UTC
I can confirm this behaviour too.
I have the same problem with a pdf using a special ttf font ( Blade runner movie ).

What's surpising is that the only affected application in my system are ... kpdf and ... gpdf.
Both exhibit the same problem
Comment 9 FACORAT Fabrice 2004-02-06 14:44:10 UTC
Created attachment 4539 [details]
bad ttf rendering for kpdf/gpdf

Have a look at the text at the left top side ( FIVENTIS )
you will notice that xpdf ( v 3.0 ), kghostview rendered it correctly whereas
kdpf and gpdf failed to render it correctly.

you have from top to bottom : xpdf, kpdf, gpdf, kghostview
Comment 10 arutha 2004-02-13 14:46:56 UTC
I'm using kpdf from the KDE 3.2.0 release and have the same problems. Everything renders in maybe Helvetica? Running xpdf 2.02.1 or kghostview everything is fine.

Using Gentoo packages for 3.2.0 gcc 3.2.3.
Comment 11 Matej Cepl 2004-02-15 19:19:02 UTC
Created attachment 4706 [details]
Example of improper rendering

Needless to say, that XPDF (both 1.00 and 2.03) on my Debian/woody works
perfectly, but Kpdf 0.3 shows this mess. xpdf rendering and pdf files will be
attached in subsequent attachements.
Comment 12 Matej Cepl 2004-02-15 19:20:29 UTC
Created attachment 4707 [details]
Example of correct rendering

xpdf 1.0 works like a charm
Comment 13 Matej Cepl 2004-02-15 19:27:45 UTC
Created attachment 4709 [details]
Example PDF file

PDF files displayed (its first page)
Comment 14 Timo Springmann 2004-02-16 08:59:03 UTC
I can confirm this bug on KDE 3.2cvs Debian/Sid.

red
Comment 15 S. Umar 2004-02-25 02:07:55 UTC
how does kpdf handle xpdf's xpdfrc file? does it use this or does it have its
own? I looked at the source and I can't find an absolute path. Where does
it read the fonts from?
Comment 16 Brandon Nuttall 2004-02-25 08:03:19 UTC
I'm seeing this behavior as well.  I'm going to attach some files and screenshots showing this behavior.
Comment 17 Brandon Nuttall 2004-02-25 08:04:08 UTC
Created attachment 4876 [details]
Original document.
Comment 18 Brandon Nuttall 2004-02-25 08:04:47 UTC
Created attachment 4877 [details]
PDF created by Kword.
Comment 19 Brandon Nuttall 2004-02-25 08:05:14 UTC
Created attachment 4878 [details]
PDF created by OpenOffice.
Comment 20 Brandon Nuttall 2004-02-25 08:10:04 UTC
Created attachment 4879 [details]
Screenshot of incorrect rendering of Kword pdf.
Comment 21 Brandon Nuttall 2004-02-25 08:11:03 UTC
Created attachment 4880 [details]
Screenshot of incorrect rendering of OO pdf.
Comment 22 Raphael Slinckx 2004-03-02 22:09:59 UTC
I can confirm this behavior too, my latex-generated pdf displays nice in xpdf and kghostview (kde3.20 under gentoo), but kpdf seems to ignore the font and uses an standard one, also i have no images (images were png included in the latex file with pdflatex).
Comment 23 Rex Dieter 2004-03-05 22:48:05 UTC
FYI, patch doesn't seem to help (much).  As a matter of fact, I can't get kdpf to display/render anything correctly.
Comment 24 Rex Dieter 2004-03-08 16:45:43 UTC
From what I can gather, kpdf doesn't seem use any embedded fonts (ie, fonts included inside the pdf files), and subsequently substitutes something else.  

When viewing such files created with pdflatex, kpdf first seems to pause for several seconds, then issues a few warnings (to konsole):
CHARACTER NOT IN FONT: fb00
...

Another problematic file issues a whole bunch of:
CLIPPING: 1 POLYS
...
FILLING: 1 POLYS
...
but these seem mostly to be some sort of debugging statements to me.
Comment 25 Ian Zagorskih 2004-03-12 08:35:16 UTC
Same problem here with kpdf/rendering
NetBSD-1.6.1/i86
XFree86 4.3.0
KDE-3.2.1 from latest pkgsrc cvs

// wbr
Comment 26 Michał Kosmulski 2004-04-01 12:37:19 UTC
I observe the same effect in kdpf in 3.2.0 and 3.2.1. For all documents I have tested, embedded fonts are not displayed, instead something looking like Helvetica is used. Even kghostview which wasn't very good at renderings PDF got the embedded fonts correctly in most cases.
Comment 27 S. Umar 2004-04-25 01:31:40 UTC
Well, is anyone listening? I went into cvs and noticed a comment stating that ttf and type1
rendering in xpdf (the one in kpdf) has been taken out.......

Kpdf is not in a state to be included in KDE...it is useless unless one is viewing a
very simple pure text document. Why would anyone use it? This is shame since the
quality of other components in KDE are excellent. Obviously there is no one working
on kpdf to address any of our complaints.
Comment 28 rgpublic 2004-04-25 11:08:47 UTC
Completely agree with comment 27.
The quality of KPDF is completely unacceptable.
And KGhostview is readily available. I really wonder why KPDF is included.
It does not match the very good overall quality of KDE applications.
One of the main reasons why people use PDF is to get the fonts
right even without a font being installed.
I haven't found one PDF it displays correctly yet.
KPDF should be taken out until it gets to a usable state.
Perhaps this bug should be renamed to "Take out KPDF"?
Or should we file a new bug for this?
Comment 29 Gilles Schintgen 2004-04-25 13:45:08 UTC
Sad but true. I'd really like to have a true pdf viewer such as xpdf, 
but not one in a pre-alpha state. I completely agree that it's too 
incomplete to have its place in KDE. And, of course, I'm looking 
forward to having a fully functional kpdf integrated in KDE!

Comment 30 jeff pitman 2004-04-25 14:39:50 UTC
Look at a Japanese PDF in kghostview ... it's terrible.

After configuring ~/.xpdfrc for Japanese support, KPDF displays much better than ghostview.

However, producing documents from LyX, you get the occasional garbage output.

Since plain ghostview really stinks at Japanese/Chinese and xpdf shines at it, I would personally view KPDF as the next standard viewer, after all the alpha-ness is removed.  Maybe KPDF should look at filling out ~/.xpdfrc a little bit better via configuration?
Comment 31 Christophe Devriese 2004-04-25 15:30:03 UTC
Look at any landscape pdf in kghostview ... it's terrible (just try it once ... e.g. http://netkit.org/docs/netkit-two-hosts-02.pdf )
Comment 32 Andre Woebbeking 2004-04-25 15:59:12 UTC
On Sunday 25 April 2004 15:30, Christophe Devriese wrote:
> ------- Additional Comments From oelewapperke ulyssis org  2004-04-25
> 15:30 ------- Look at any landscape pdf in kghostview ... it's
> terrible (just try it once ... e.g.
> http://netkit.org/docs/netkit-two-hosts-02.pdf )

try it with GhostScript 8, looks perfect.


André

Comment 33 Christophe Devriese 2004-04-25 16:29:01 UTC
On Sunday 25 April 2004 15:59, André Wöbbeking wrote:
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.
>
> http://bugs.kde.org/show_bug.cgi?id=67950
>
>
>
>
> ------- Additional Comments From woebbeking web de  2004-04-25 15:59
> -------
>
> On Sunday 25 April 2004 15:30, Christophe Devriese wrote:
> > ------- Additional Comments From oelewapperke ulyssis org  2004-04-25
> > 15:30 ------- Look at any landscape pdf in kghostview ... it's
> > terrible (just try it once ... e.g.
> > http://netkit.org/docs/netkit-two-hosts-02.pdf )
>
> try it with GhostScript 8, looks perfect.

are you using "gv" or "kghostview" ?

greetings,

Oelewapperke

Comment 34 Gilles Schintgen 2004-04-25 16:43:58 UTC
> ------- Look at any landscape pdf in kghostview ... it's terrible (just try
> it once ... e.g. http://netkit.org/docs/netkit-two-hosts-02.pdf )

That's right, there's a problem with this pdf, but kpdf doesn't get it right 
either! (xpdf and acrobat are ok.)

Comment 35 Andre Woebbeking 2004-04-25 17:32:05 UTC
On Sunday 25 April 2004 16:29, Christophe Devriese wrote:
> > try it with GhostScript 8, looks perfect.
>
> are you using "gv" or "kghostview" ?

I use KGhostView (of course :-). Previous versions of GhostScript had 
problems with landscape but this is fixed with version 8.


André

Comment 36 jeff pitman 2004-07-25 18:22:39 UTC
LANG=zh_TW adversely affects font rendering.  I think QT kicks in and tries to be smart by doing some font replacing, I can't tell but, the Nokia 6600 AT Commandset: http://ncsp.forum.nokia.com/download/?asset_id=11579;ref=devx looks terrible with characters all mashed together.

More on font rendering woes can be found here: http://bugs.kde.org/show_bug.cgi?id=39185
Comment 37 John D. Hendrickson 2004-07-25 19:45:14 UTC
Hi,

Every has "probems" with fonts.  Relax.

You likely have a awkward set of "font.alias" files.  These can really screw up your font system by choosing stupid fonts instead of the real and existing font.

You also might not have:

   0) configured X, xfs, xfs-tt for fonts correctly
   1) have had your fonts installed properly
          may not have looked into rebuilding your font
          information files.  Try installing biznet fonts
   2) bought a full set of quality fonts
   3) insured that KDE and GNOME font adds are getting used

In general, its not a new thing.  Linux distributors tend to slack off when it comes to fonts.

Comment 38 Rex Dieter 2004-07-27 15:15:57 UTC
Confirmed problem with kpdf on kde-3.3beta2.  As a matter of fact, I can't get it to properly display *any* pdf file, particularly ones with embedded fonts.
Comment 39 Timo Springmann 2004-08-28 00:37:54 UTC
Confirmed problem with kde 3.3.0 (debian/sid). I had this problem since kpdf was introduced. There's no single document here that kpdf shows correctly. kpdf is not usable. Fonts are working fine in every other application here, so I don't think I've misconfigured my system... 
Comment 40 Henrique Pinto 2004-08-28 02:16:32 UTC
This problem is solved in HEAD, KPDF in KDE 3.4 will be really wonderful. HEAD still compiles with KDE libs 3.3, so you might check kdegraphics/kpdf from CVS and compile it in order to have this solved. I believe some of the changes will also be backported to 3_3_BRANCH.
Comment 41 Kuba Ober 2004-08-30 19:35:25 UTC
I don't know why but it works just fine for me as far as fonts are concerned. The landscape problems remain.

System: Up-to-date Fedora Core 1
qt-3.3.3 compiled from redhat-derived 3.3.2 SRPMs (available at http://www.ibib.waw.pl/~winnie)
kde 3.2.3 compiled w/noalsa setting, from SRPMs on ftp.kde.org

I.e. stuff is self-compiled but those are still rather standard RPMs.
Comment 42 James Richard Tyrer 2004-09-09 08:08:42 UTC
Re Comments 17, 18 & 19:

Using KDE 3.3 BRANCH downloaded today.

The PDF created by Kword is not correct.  The embedded font is wrong -- it is Helvetica.  Therefore, this is never going to render correctly.

Since BOTH PDFs have the fonts embedded, the font setup on your system should not affect the rendering of the PDFs.  It is, however, probable that there is a font setup issue on the system that created the PDF from KWord.  

This (KWord) PDF renders the same in KPDF and Acrobat reader so despite the fact that the PDF is wrong, the bug is fixed to this extent.  The problems shown in Comment #20 have been fixed.

The PDF created by OO appears to render correctly with Adobe Acrobat Reader. But it doesn't redender at all in KPDF.  It is possible that this is due to the fact that the OO PDF contains Type 42 outline fonts.  If this is the problem, this would be a different bug.

--
JRT
Comment 43 Albert Astals Cid 2004-09-09 19:20:21 UTC
I can see all that files correctly (assuming correctly = xpdf) with kpdf that will come with kde 3.3.1, so i am closing that bug. Please if you still think some of that files are displayed wrong open a SEPARATE bug report and include the file.