[KDE Dot News]
 faq
 flatforty
 contribute
 subscribe
 configure
 search
 rdf

 main
 parent


Kerning
by Martin on Monday 27/Aug/2007, @22:27
Oh no! Look at the "statistics" screenshot. Kerning is as bad as it always has been. The developers used to promise that this would be fixed with Qt 4; more recently they have been pointing to the fonts. Please, show just one rendered PDF or even a screenshot where the text really looks good and prove me wrong! Because so far, sadly, and I am not trolling here, but speaking from experience, I have never seen acceptable output from KWord: any version or font family.
  Related Links
 ·   Articles on KDE Office Suite
 ·   Also by Martin
 ·   Contact author

Thread Threshold:

The Fine Print: The following comments are owned by whomever posted them.
( Reply )

Re: Kerning
by KDE User on Monday 27/Aug/2007, @23:08
Forgive my ignorance, but what does the kernel have to do with fonts?
[ Reply To This | View ]
  • Re: Kerning
    by Boudewijn Rempt on Monday 27/Aug/2007, @23:21
    Well, in Windows, the truetype bytecode interpreter is part of the kernel, but that's not what the original poster meant. He means the way letter shapes (glyphs) are slightly moved about to create a pleasing result. Like a lower-case o being shifted a little bit to fit under a capital V in the the sequence "Vo". That's what's called kerning. Whether kerning works or not is dependent on the font -- if the included kerning tables suck, then the result will suck, and on a couple of other things, including Qt Scribe and Freetype.

    Why exactly the kerning is off sometimes, with some fonts when using Freetype and Qt Scribe is a bit of a mystery to me. I've seen great results with KWord 2.0 myself, but so I've seen great result with KWord 1.6. But I haven't investigated myself, being busy with Krita, and I'm sure that Thomas Zander is hot on the trail of the remaining font problems.
    [ Reply To This | View ]
    • Re: Kerning
      by Boudewijn Rempt on Tuesday 28/Aug/2007, @01:24
      Ok, I investigated a bit. Apparently there's currently a bug in Qt that makes KWord obey the hinting settings. If you set hinting to anything but None (as you should anyway, hinting is evil), your text will be really bad. Another issue is with fonts: some fonts just have extremely bad kerning tables. Look at the attached image to see some very good lines of text in KWord, and some less good ones: Sans Serif and Arial are pretty bad, Georgia fair to middling. Times New Roman, Perpetua, Zapf Chancery, Bembo and Garamond are really pretty good. But then, those are expensive, professional fonts.

      Actually, I think Bembo has never looked as good on screen as it does in KWord trunk.
      Click to download attachment kword_trunk_native_no_hinting.png
      202KB (207860 bytes)

      [ Reply To This | View ]
      • Re: Kerning
        by KDE User on Tuesday 28/Aug/2007, @02:13
        Thank you for a most awesome explanation and illustration!
        [ Reply To This | View ]
      • Re: Kerning
        by boemer on Tuesday 28/Aug/2007, @03:23
        Looks like only the windows fonts look really good (I'm looking at the 'u' in "Tussen"). It looks good in Arial, Garamond, Times New Roman, but not in the the other linux-specific? fonts...

        Well if it works, at least with the windows fonts, than it is okay. Although I hope ofcourse those other fonts will get better over time....
        [ Reply To This | View ]
        • Re: Kerning
          by Boudewijn on Tuesday 28/Aug/2007, @08:42
          Actually, only the first font ("sans serif") is a free font. The rest are mac/windows commercial fonts. Pretty expensive ones, too. And I'm so fond of Bembo...
          [ Reply To This | View ]
      • Re: Kerning
        by Niels on Tuesday 28/Aug/2007, @11:23
        IMHO:

        Garamond: The "r" is too strong -- it stands out in "typographie" and "kerning".

        Bembo: Bad kerning in in "Waar" and "Tussen".

        Perpetua: Bad kerning in "voorbeeld"
        [ Reply To This | View ]
      • Re: Kerning
        by christoph on Tuesday 28/Aug/2007, @17:29
        Aww, the character positioning looks really bad for all of the fonts in that screenshot.

        The problem is that Qt (being based on the OS's native font system) does only support integral character positions, making it impossible to get correct layout (line lengths etc.) and correct positioning at the same time.

        Please see <A HREF="http://antigrain.com/research/font_rasterization/index.html">http://antigrain.com/research/font_rasterization/index.html</A> for some awesome results that are possible using FreeType directly, bypassing the OS's font system.

        Especially worth noting is <A HREF="http://antigrain.com/research/font_rasterization/sample_arial_03.png">this screenshot</A> (yes the font is small, but this even more so proves the author's point).
        [ Reply To This | View ]
        • Re: Kerning
          by Boudewijn Rempt on Wednesday 29/Aug/2007, @00:53
          Given that there's no word processing software yet that works the way the author of that article proposes, it's a bit silly to hold it up as the standard. Compared to the same text in OO.org or Abiword, KOffice 2.0 is doing really well.
          [ Reply To This | View ]
          • Re: Kerning
            by André on Wednesday 29/Aug/2007, @05:15
            Still, you have to admit that the results look pretty amazing. At least to my rather untrained eye.
            [ Reply To This | View ]
        • Re: Kerning
          by Thomas Zander on Wednesday 29/Aug/2007, @10:02
          > The problem is that Qt (being based on the OS's native font system) does
          > only support integral character positions, making it impossible to get
          > correct layout (line lengths etc.) and correct positioning at the same time.

          Qt's font system uses qreal (doubles) in the API everywhere and maps that to a high-res grid of integers to keep things fast. There is virtually no loss there so the statement above doesn't really apply to the KWord case. Sorry.
          [ Reply To This | View ]
          • Re: Kerning
            by christoph on Thursday 30/Aug/2007, @10:50
            You are right about the API and internal calculations using qreals, but the actual rendering is not done in sub-pixel positioned precision.

            Try rendering a couple of letters each moved by a fractional pixel coordinate, and you will see that they all end up looking the same.

            Compare that to KPDF's rendering (3.5.7, didn't try 3.91 yet), where the bitmap of a letter is different depending on (sub-pixel) position.

            Of course it also has to do with Qt (or FreeType?) trying very hard to cache the bitmaps. In earlier versions of Qt/FreeType, you could bypass caching by scaling with, say, a factor of 1.00001, and get very good results. But in recent versions, the cache is used even for rotated fonts, making the result look really funny.

            And seeing the good quality of KPDF and its good speed, I doubt that a Word Processor couldn't get nearly the same results.
            [ Reply To This | View ]
        • Re: Kerning
          by Vide on Friday 31/Aug/2007, @04:39
          Sorry maybe I'm blind but I see no problems at all with kerning in Boudewijn's screenshot
          [ Reply To This | View ]
Re: Kerning
by Pinaraf on Tuesday 28/Aug/2007, @05:40
That's not only Qt...
I just upgraded my (free) ATI driver to the latest git to get xrandr 1.2 support, and all the font rendering is now far far better everywhere. For instance in KWord the text underline was in the middle of the text, now its position is good. So be careful with this font thing...
[ Reply To This | View ]
  • Re: Kerning
    by Thomas Zander on Tuesday 28/Aug/2007, @08:57
    yes, very right. I said to Boud on IRC its likely in the 'lower layers', it ended up on his post above as 'in Qt'. Almost right :)

    There are actually various shared libs being used by a large set of font rendering stuff on Linux. This are all rapidly improving since not only KWord, but all of Qt, Pango (for gtk stuff) and IIRC also firefox are sharing that lower level stuff.

    KWord is not released yet, and we are all working hard on fixing all the things that need to be fixed to make KOffice have the most beautiful and versatile text layouting and rendering engine for you.

    So, for the guy that went slightly off topic on this GSoC story; this is alpha stage software and we are aware of such issues. Working on it! :)
    [ Reply To This | View ]

 
The Fine Print: The previous comments are owned by whomever posted them.
( Reply )

  "Spare time? What's that?" -- Dirk Mueller
KDE®, "K Desktop Environment", "KDE Dot News", "got the dot?" and the KDE Logo® are trademarks or registered trademarks of KDE e.V. in the European Union, the United States and other countries. All other trademarks and copyrights on this page are owned by their respective owners. Comments are owned by the poster. The rest: Copyright © 2000-2008 KDE e.V. for The KDE Project. For further information or comments on this site, please contact the Webmaster.
[ home | post article | flat forty | subscribe | search | rdf ]