freetype-devel
[Top][All Lists]
Advanced

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

Re: Overlap oversampling


From: David Turner
Subject: Re: Overlap oversampling
Date: Tue, 23 Jun 2020 20:16:55 +0200



Le mar. 23 juin 2020 à 05:42, Alexei Podtelezhnikov <apodtele@gmail.com> a écrit :
Hi again,

The oversampling is implemented though inflating the outline and then
averaging the increased number of cells using FT_RASTER_FLAG_DIRECT
mechanism. The first two patches set the stage by splitting the code
paths for LCD rendering out of the way and trying
FT_RASTER_FLAG_DIRECT for FT_RENDER_MODE_LCD. The third one implements
oversampling by replacing the normal rendering with oversampling if
SCALE is 2 or 4 (as opposed to 1). Again the proposal is to have it as
FT_RENDER_MODE_SLOW eventually. The slightly complicated averaging of
cells is due to 255/4+255/4+255/4+255/4 = 252 instead of 255, so we
have to do rounding, yet avoid overflowing.

Thanks, I'll take a look at your patches.

However, please don't call it FT_RENDER_MODE_SLOW, the fact that it is slow is an implementation detail, and we could very well replace this with a different algorithm in the future (maybe slow, maybe not). So something like FT_RENDER_MODE_OVERLAPPED_OUTLINES seems more appropriate, since it describes why you would want to use this mode, instead of what its performance profile is :-)

Comments?

Alexei

reply via email to

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