bugThe FreeType Project - Bugs: bug #21190, Autohinter+ligatures problem

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #21190: Autohinter+ligatures problem

Submitter:  Nicolas Mailhot <nmailhot>
Submitted:  Sat 29 Sep 2007 07:53:49 AM UTC
   
 
Severity:  3 - Normal Item Group:  Incorrect behaviour
Status:  Fixed Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  2.3.8

Jump to the original submission

Fri 05 Dec 2008 10:51:04 PM UTC, comment #14: 

Oops, I used the wrong ftstring binary :-)  Too much of them installed on my system...  Now I can reproduce the problem.

Thanks for the fix!  I've extended it to cover other Unicode blocks too.

Please test.

Werner LEMBERG <wl>
Group administrator
Fri 05 Dec 2008 10:02:12 PM UTC, comment #13: 

I just tested the fix and it has indeed fixed it for Mozilla and the other
applications I have seen it in.
Also fixed with:
pango-view --font 'dejavu sans 10' --dpi 96 --text 'f f ff fi f f'


Kriston Rehberg <kjrehberg>
Fri 05 Dec 2008 09:12:45 PM UTC, comment #12: 

Patch that fixes for me:

diff -u -p -d -r1.65 aflatin.c
--- src/autofit/aflatin.c 7 Jul 2007 07:30:39 -0000 1.65
+++ src/autofit/aflatin.c 5 Dec 2008 21:12:08 -0000
@@ -2144,6 +2144,7 @@
     { 0x20A0, 0x20CF },  /* Currency Symbols */
     { 0x2150, 0x218F },  /* Number Forms */
     { 0x2460, 0x24FF },  /* Enclosed Alphanumerics */
+    { 0xFB00, 0xFB06 },  /* Latin Ligatures */
     { 0     , 0      }
   };
 

Behdad Esfahbod <behdad>
Fri 05 Dec 2008 09:01:47 PM UTC, comment #11: 

Oh my goodness, that's right, since FreeType knows not of ligatures, ft2demos would not see them if you just type the two letters.


Kriston Rehberg <kjrehberg>
Fri 05 Dec 2008 08:59:37 PM UTC, comment #10: 

This is DejaVu Sans 2.26

Behdad Esfahbod <behdad>
Fri 05 Dec 2008 08:56:18 PM UTC, comment #9: 

Werner, did you copy/paste my command or retype it?  Those are ff, fi, ... characters, not f followed by i.

/me tests with freetype head.

Behdad Esfahbod <behdad>
Fri 05 Dec 2008 08:48:51 PM UTC, comment #8: 

I have been unable to reproduce it using ft2demos at any point size and screen resolution setting, either.


Kriston Rehberg <kjrehberg>
Fri 05 Dec 2008 08:47:05 PM UTC, comment #7: 

I can't repeat it with DejaVu Sans Versions 2.21, 2.25 or 2.26,
using the current CVS version of ftstring (where the library is
compiled with `make devel; make').

Everything just looks fine, either with or without autohinter.

So either you use a different DejaVu Sans Version, or you have
a special compilation setup which causes problems.  Please give
more details.

Werner LEMBERG <wl>
Group administrator
Fri 05 Dec 2008 08:31:26 PM UTC, comment #6: 

Hi Werner,

The bug is indeed in the FreeType autohinter.  Here is how you reproduce using ftstring:

ftstring -m 'f ff fi fl ffi ffl f' 13.3 /usr/share/fonts/dejavu/DejaVuSans.ttf

Behdad Esfahbod <behdad>
Fri 05 Dec 2008 08:21:13 PM UTC, comment #5: 

Can we please re-open this bug?
The comments at the following bug suggest that the autohinter is at fault in rendering some ligatures:
http://savannah.nongnu.org/bugs/?25013

Kriston Rehberg <kjrehberg>
Thu 04 Dec 2008 10:21:23 PM UTC, comment #4: 

If you can't reproduce it with any of the FreeType test programs there is a high chance that a different library causes the problem.

Maybe a higher-level library replaces the `fi' ligature from a different font?  You should contact the people who are maintaining the library which accesses FreeType.

I don't use Fedora – I suggest you open a bug report for this distribution.  In case it is really connected to a FreeType problem the Fedora people will contact us, I'm quite sure.

Please reopen the bug in case you can provide more detailed information.

Werner LEMBERG <wl>
Group administrator
Thu 04 Dec 2008 09:09:35 PM UTC, comment #3: 

Opened bug 25013 to ask for an option to disable ligatures.
https://savannah.nongnu.org/bugs/index.php?25013

Kriston Rehberg <kjrehberg>
Thu 04 Dec 2008 09:04:44 PM UTC, comment #2: 

I cannot reproduce the ligatures problem using ftview or ftdiff, however it is readily apparent on Fedora 10 whenever an "f" is followed by an "i".
Furthermore, it appears on DejaVu Sans font at 15pt on a 72dpi screen in Xorg using Mozilla Thunderbird and Mozilla Firefox, but the problem does NOT appear at 14pt on the same screen.  The ligatures descend about 2 points downward and are very out-of-place.  You can most easily see this by installing and using Fedora 10 (or any version of Fedora since Fedora Core 6) which always uses the autohinter and DejaVu fonts.

Kriston Rehberg <kjrehberg>
Sun 18 May 2008 08:10:17 PM UTC, comment #1: 

Sorry for the late reply.

Can you give a recipe with one of the FreeType demonstration programs (like ftview or ftdiff) to show the problem?

Note that a few days ago I've fixed a bug w.r.t. different heights of autohinted glyphs.  Maybe this fixes your problem too, so please test the current CVS.

Werner LEMBERG <wl>
Group administrator
Sat 29 Sep 2007 07:53:49 AM UTC, original submission:  

It seems the freetype autohinter has a problem with ligatures. When you type a
suite of fffff in a text box that uses a font including ligatures (like DejaVu
sans) you'll see the autohinter size "ff" and "f" differently

Version-Release number of selected component (if applicable):

freetype-2.3.5-3.fc8.x86_64

Nicolas Mailhot <nmailhot>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #16988:  Screenshot-Untitled Window-1.png added by behdad (8KiB - image/png - After.)
file #16987:  Screenshot-Untitled Window.png added by behdad (10KiB - image/png - ftstring with freetype from cvs head)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by behdad (Posted a comment)
  • -email is unavailable- added by kjrehberg (Posted a comment)
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by nmailhot
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 13 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-12-05 wl StatusNeed Info Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 2.3.8
    2008-12-05 behdad Attached File- Added Screenshot-Untitled Window-1.png, #16988
    2008-12-05 behdad Attached File- Added Screenshot-Untitled Window.png, #16987
    2008-12-05 wl StatusInvalid Need Info
        Open/ClosedClosed Open
    2008-12-04 wl StatusNeed Info Invalid
        Open/ClosedOpen Closed
    2008-05-18 wl StatusNone Need Info
        Assigned toNone wl
    2007-11-02 nmailhot Carbon-CopyRemoved 62536 -
    2007-10-24 nmailhot Carbon-Copy- Added fedorafonts

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code