[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Overlap oversampling
From: |
Alexei Podtelezhnikov |
Subject: |
Re: Overlap oversampling |
Date: |
Mon, 29 Jun 2020 20:46:05 -0400 |
David,
On Mon, Jun 29, 2020 at 6:58 PM David Turner <david@freetype.org> wrote:
> So, could have a deep look at the patches here. They're pretty neat. I'll
> just recommend documenting the subtle computations in ft_smooth_slow_spans()
> a little better, and avoid branches altogether, by using bit twiddling to
> perform saturated addition instead (removing branches from loops is always
> best for performance). I.e. something like the following:
I completely agree with sum | -(sum>>8). Another idea is sum - (sum>>8).
> Can you tell me how to actually test that the code works as expected though?
The proof-of-concept patch is set up to replace normal rendering with
oversampling when SCALE is 2 or 4. I was using this font:
https://github.com/adobe-fonts/source-serif-pro/tree/release/VAR
I suggested FT_RENDER_MODE_SLOW to explicitly discourage its use for
good fonts. We can do FT_RENDER_MODE_OVERSAMPLE instead. Werner also
suggested using OVERLAP_SIMPLE and OVERLAP_COMPOUND flags to trigger
this mode but they may be unset or unavailable. I think this mode
should be explicit.
Regards,
Alexei