freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] "Inside the fastest font renderer in the world" - BUG FIX


From: Nigel Tao
Subject: Re: [ft-devel] "Inside the fastest font renderer in the world" - BUG FIX
Date: Mon, 29 Aug 2016 11:16:43 +1000

On Mon, Aug 29, 2016 at 10:58 AM, Nigel Tao <address@hidden> wrote:
> The font-go patch to fix this (grep for "clamp") is at
> https://github.com/google/font-go/commit/568cda65618dfe210268a93e399db6c9ca409104

To clarify, this commit wasn't necessary for the "on-curve point at
the bottom right" out-of-bounds, as I had noticed and fixed that
earlier. What's new in that commit is letting you draw lines outside
the raster (and having it look reasonable) and I suspect would also
fix the "floating point rounding errors lead to a -1 index" problem
that Graham mentioned.

Prior to that commit, when drawing outside the raster (whether
explicitly or via a rounding error), you'd get a nonsense result
instead of a crashing result (Go programs automatically crash on an
array out-of-bounds), due to the explicit bounds checks I added before
that commit.

After that commit, as I said, you end up with something looking reasonable.

Speaking of floating point rounding, I also filed
https://github.com/google/font-rs/issues/13 "f32 -> u8 conversion
should multiply by 256-ε instead of by 255".



reply via email to

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