Bug 15909 - Non-ideal rendering of Latin ligatures for 'fl' and 'fi'
Summary: Non-ideal rendering of Latin ligatures for 'fl' and 'fi'
Status: RESOLVED FIXED
Alias: None
Product: freetype
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Werner Lemberg
QA Contact:
URL:
Whiteboard:
Keywords:
: 18899 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-05-12 07:02 UTC by F Wolff
Modified: 2008-12-08 08:57 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Rendering with pango (717 bytes, image/png)
2008-05-12 07:02 UTC, F Wolff
Details

Description F Wolff 2008-05-12 07:02:59 UTC
Created attachment 16482 [details]
Rendering with pango

Using Dejavu 2.23 as packaged for Mandriva 2008.1, I get the following rendering of the Latin ligatures ff and fi, in which the ligatures do not correspond well to the normal rendering of the letter 'f'.

The attachment is generated with:
pango-view "--font=DejaVu Sans" --output=dejavu-2.23_ligatures.png ligature

Notice how the bar of the 'f' is not on the same height, the hinting at the bottom does not correspond, and the height of the glyphs don't correspond.

Perhaps extra information from my system might be useful - not sure what though, so feel free to say if important information is missing, or this is a known problem.
Comment 1 Ben Laenen 2008-05-12 07:24:35 UTC
That's a FreeType bug, and unfortunately we can't do anything to fix that in our font. The problem happens with the freetype autohinter, so try to enable the bytecode interpreter for font hinting (so it uses the hinting as defined by the font).
Comment 2 Ben Laenen 2008-12-05 08:05:00 UTC
*** Bug 18899 has been marked as a duplicate of this bug. ***
Comment 3 Kriston Rehberg 2008-12-05 08:14:11 UTC
(In reply to comment #1)
> That's a FreeType bug, and unfortunately we can't do anything to fix that in
> our font. The problem happens with the freetype autohinter, so try to enable
> the bytecode interpreter for font hinting (so it uses the hinting as defined by
> the font).
> 

It is NOT a FreeType Bug, as per upstream FreeType developers.
I have reported this bug upstream to FreeType and they insist that this is not their bug, either.
Re-opening so we can pursue this further.
It's very noticeable on Fedora 10, too.

Comment 4 Ben Laenen 2008-12-05 08:38:58 UTC
I'd like to hear their arguments then why it's a bug in DejaVu.

The reasons why it's not are quite clear:
* we have truetype hinting that force the ligatures to have the exact height as the normal letters "f" and "i". These have been verified numerous times in the past.
* The outlines of the fi ligatures are also exactly the same compared to "f" and "i".
* Fedora disables the freetype bytecode interpreter (which is needed to read those truetype hinting instructions) (patent reasons), and makes use of the freetype autohinter that doesn't read the hinting instructions
* Without the instructions, the only thing that freetype can use to render the glyphs are some smart algorithms, and the only data it can use from the font are the glyph outlines.
* The outlines are correctly sized, as mentioned above. There's not a single different thing we can do in a font to influence the behaviour of the freetype autohinter in some way.
* Hence, the only reason why the glyphs you see are misrendered is that something is wrong in the algorithms used by the freetype autohinter, since that's the only thing that can affect the shapes you see.

Now, if Freetype autohinters have another opinion, then I'd like to hear it. For now, this is clearly not our bug.
Comment 5 Kriston Rehberg 2008-12-05 08:44:53 UTC
Here is FreeType's discussion on the bug:

http://savannah.nongnu.org/bugs/?25013
Comment 6 Kriston Rehberg 2008-12-05 08:46:02 UTC
(In reply to comment #5)
> Here is FreeType's discussion on the bug:
> 
> http://savannah.nongnu.org/bugs/?25013
> 

I pointed out that the bug only appears when the autohinter is enabled.  That rather clearly implicates a FreeType problem, since I'm not changing around Fontconfig or Pango.
Comment 7 Ben Laenen 2008-12-05 08:49:38 UTC
Well, the report you mention has nothing to do with this rendering bug... You asked for a way to disable the ligatures, and didn't mention anything about freetype rendering them incorrectly with their autohinter...
Comment 8 Kriston Rehberg 2008-12-05 08:51:04 UTC
Sorry, this is the correct link:

http://savannah.nongnu.org/bugs/?21190
Comment 9 Kriston Rehberg 2008-12-05 08:55:51 UTC
(In reply to comment #7)
> Well, the report you mention has nothing to do with this rendering bug... You
> asked for a way to disable the ligatures, and didn't mention anything about
> freetype rendering them incorrectly with their autohinter...
> 

Incidentally the original report does mention that.
Comment 10 Werner Lemberg 2008-12-06 00:28:51 UTC
This should be fixed now with the current CVS.  It was indeed a bug in FreeType but on the configuration side (the CJK hinter was applied to the Latin ligature block in Unicode).

Please test.
Comment 11 Kriston Rehberg 2008-12-08 08:57:54 UTC
I have confirmed the bug is fixed in the latest FreeType CVS for the offending Latin ligatures in the DejaVu font family.
Thank you for your effort!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.