[HarfBuzz] harfbuzz: Branch 'master' - 5 commits

Khaled Hosny khaledhosny at eglug.org
Tue Sep 3 15:29:38 PDT 2013


On Tue, Sep 03, 2013 at 06:16:37PM -0400, Behdad Esfahbod wrote:
> On 13-09-03 06:08 PM, Khaled Hosny wrote:
> > On Tue, Sep 03, 2013 at 04:21:12PM -0400, Behdad Esfahbod wrote:
> >> Are you shaping at upem size?
> > 
> > That is just the output of hb-shape, so I guess yes.
> > 
> >> If Uniscribe returns the old value then this is definitely a bug.
> > 
> > Seems so:
> > 
> >   $ cat test | hb-shape.exe amiri-regular.ttf --shapers=uniscribe
> >   [uni06DD=0+2620|one.small=1 at -2210,0+0|two.small=2 at -1610,0+0|three.small=3 at -1010,0+0]
> > 
> >   $ cat test | hb-shape.exe amiri-regular.ttf --shapers=ot
> >   [uni06DD=0+2620|one.small=1 at -2209,0+1|two.small=2 at -1609,0+1|three.small=3 at -1009,0+1]
> > 
> >> Feel free to suggest a patch.  Or we can just revert.
> > 
> > I’m not sure I understand the math behind that commit, so I can’t
> > suggest a fix.
> 
> It's simply adding .5, supposedly to get round instead of floor behavior.  I
> probably screwed up.  Will check.

I figured that out, but it looked like it was subtracting .5 for me,
which was puzzling. I guess I know why now, the affected values are
negative, so it ends up with something like:

  (-2210.0 * 2048 + 1024) / 2048

which is -2209.5, not -2210.5 as probably expected.

Regards,
Khaled



More information about the HarfBuzz mailing list