[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Math differences between FT_Set_Transform and FT_Glyph_Transform

From: David Turner
Subject: Re: Math differences between FT_Set_Transform and FT_Glyph_Transform
Date: Tue, 14 Jul 2020 16:15:03 +0200

Le mar. 14 juil. 2020 à 09:42, Werner LEMBERG <> a écrit :

> Hello Derek,
> sorry for the late reply.
> >
> > I don't really have a question beyond: is my understanding of what's
> > going on correct?
> Your understanding is correct: `FT_Face::FT_GlyphSlot::advance` is in
> 26.6 format, while `FT_Glyph::advance` is in 16.16 format, and the
> different rounding causes slight differences in the result.
> And I agree that there is probably nothing to be fixed except the
> documentation, which should mention this difference, and how to
> circumvent it if necessary.
> David?
Yes, FT_Set_Transform is a convenience function, and client code should use
direct floating-point computations for better accuracy.
Here's a patch to update the function's documentation. Feel free to correct
and apply it.

- David

> By the way, do you have a reason to mix `FT_Set_Transform` with
> `FT_Glyph_Transform` to get the same advance widths?  Otherwise, the
> difference shouldn't be an issue, right?
>     Werner

Attachment: 0001-doc-Update-FT_Set_Transform-documentation.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]