Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-12048

Please support lsb/rsb deltas when rendering font using Freetype's autohinter

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • Some future release
    • 4.6.3
    • GUI: Font handling
    • None
    • openSUSE linux 11.1 x86_64 with freetype-2.3.12.

    Description

      I'm using non-slight auto-hinted fonts (enabled through ~/.fonts.conf) on my desktop and sometimes the results are way bad (e.g. Arial bold 8pt at 96dpi), the letter spacing is very inconsistent.

      I checked "ftdiff -r 96 -s 8 arialbd.ttf" and saw that the bad results happen when it's in "no deltas" mode, while in "deltas" mode the auto-hinter's spacing looks very very nice.

      I asked about this at Freetype mailing lists and the answer was that qt (among others) needs to implement using the rsb_delta / lsb_delta values to adjust letter spacing when using auto-hinted rendering.

      This is very important because: a) Bytecode-hinting is patented and disabled by default in Freetype. b) Some people cannot stand the bytecode-hinting and think it's too ugly (including me). c) The slight auto-hinting is too blurry.
      So this leaves the non-slight auto-hinting. Implementing this feature will make it (and the whole Linux/KDE desktop) look very beautiful.

      The attached screenshot shows 4 texts - ftdiff bytecode-hinted, ftdiff auto-hinted with deltas, ftdiff auto-hinted without deltas, Qt (which looks the same as ftdiff auto-hinted without deltas, which is obviously not good).

      ftdiff's screen was obtained using: "ftdiff -r 96 -s 8 arialbd.ttf" and then pressing "d h r 2 r 1 r".

      My ~/.fonts.conf contains the following:

      <?xml version="1.0"?>
      <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
      <fontconfig>
      <match target="font" >
      <edit mode="assign" name="rgba" >
      <const>none</const>
      </edit>
      </match>
      <match target="font" >
      <edit mode="assign" name="hinting" >
      <bool>true</bool>
      </edit>
      </match>
      <match target="font" >
      <edit mode="assign" name="hintstyle" >
      <const>hintfull</const>
      </edit>
      </match>
      <match target="font" >
      <edit mode="assign" name="autohint" >
      <bool>true</bool>
      </edit>
      </match>
      <match target="font" >
      <edit mode="assign" name="antialias" >
      <bool>true</bool>
      </edit>
      </match>
      <match target="font" >
      <edit mode="assign" name="dpi" >
      <double>96</double>
      </edit>
      </match>

      <!-- Accept bitmap fonts -->
      <selectfont>
      <acceptfont>
      <pattern>
      <patelt name="scalable"><bool>false</bool></patelt>
      </pattern>
      </acceptfont>
      </selectfont>

      </fontconfig>

      Attachments

        1. ftdiff_lsb_rsb_qt_app.png
          ftdiff_lsb_rsb_qt_app.png
          137 kB
        2. ftdiff_lsb_rsb_qt.png
          ftdiff_lsb_rsb_qt.png
          132 kB
        3. qt-font-delta-bug.tgz
          14 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            alex_sh Alexander
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes