[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Devel] Autohinter, Advances and Composite Glyphs
From: |
Martin Granell |
Subject: |
[Devel] Autohinter, Advances and Composite Glyphs |
Date: |
Tue, 10 Apr 2001 11:29:49 +1000 |
> Hi all,
> I've found a little issue with the Autohinter when trying to render
> composite glyphs, it sets the horizontal advance of the glyph to zero.
> I think this is the problem:
> In ahhint.c, when hinting a standard outline glyph, it copies the
> original metrics into hinter->pp1 and hinter->pp2, and then does stuff.
> However, when hinting a composite, it doesn't set hinter->pp1 and
> hinter->pp2 initially, but when iterating through sub-glyphs runs the
> following code:
>
> if ( subglyph->flags & FT_SUBGLYPH_FLAG_USE_MY_METRICS )
> {
> pp1 = hinter->pp1;
> pp2 = hinter->pp2;
> }
> else
> {
> hinter->pp1 = pp1;
> hinter->pp2 = pp2;
> }
>
>
> If the flag is set (which it seems to be for the particular
> font/environment I'm using), pp1 and pp2 are both set to 0. These then get
> used later to set the advance on the glyph.
> A fix (not sure if it is correct) was to copy the intialization code
> into the composite case, patch is attached (against ft-2.0.2).
>
> btw, there are issues with rendering the Microsoft font MingLiu, the
> character strokes are incorrect for some reason. If I've got some time
> I'll try and find out why (although my knowledge of outlines/strokes is
> zero at the mo.)
>
> Yours,
> Martin
>
> <<ahhint.diff>>
ahhint.diff
Description: Binary data
- [Devel] Autohinter, Advances and Composite Glyphs,
Martin Granell <=