freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] How the new lcd filter coefficients in 2.6.2 were choosen


From: Markus Trippelsdorf
Subject: Re: [ft-devel] How the new lcd filter coefficients in 2.6.2 were choosen?
Date: Wed, 3 May 2017 08:40:48 +0200

On 2017.05.03 at 01:48 +0300, Vladimir A. Pavlov wrote:
> And especially for the progress achieved since 2.4.x versions.
> 
> I had never liked how freetype renders subpixel-antialiased fonts. They
> looked very colorful and "ugly-reliefy" - they looked as if they has a 3d
> height above the monitor (I prefer unhinted rendering btw).
> 
> It was highly uncomfortable for my eyes to look at them after ~2 hours at a
> computer. In about freetype 2.4.8 I just turned subpixel antialiasing off and
> start using "plain" grayscaling rendering.
> 
> But recently I turned subpixel rendering back on and saw... it's now awesome!
> I really like how text looks now (2.7.1). The letters are nicely beautiful,
> non-reliefy, look more similar to macOS rendered ones (than in 2.4.x) and...
> my eyes are happy even after ~8 hours at the monitor!
> 
> I cannot exactly say how you did it guys. Just THANK YOU! Font rendering
> now is visually MUCH better than it was in 2.4.x. I cannot say what makes
> the difference since visually it looks very similar to what was before. But
> feelings are what tells me the actual huge difference.
> 
> And now THE QUESTION.
> 
> One of the most important reasons of such improvements for me I guess
> is the default lcd filter change in 2.6.2.
> 
> Here https://www.freetype.org/freetype2/docs/reference/ft2-lcd_filtering.html
> I found that the new coefficients "08 4d 56 4d 08" are "normalized and
> color-balanced". But AFAIU there are many filters possible that are
> "normalized and color-balanced" which make text look terrible.
> "2a 2b 56 2b 2a" is an example of such a filter.
> 
> So, how did you get the values used currently as the default? Are there other
> properties besides the two mentioned, that helped you to "calculate" such a
> filter? Or did you just try different variants and choose the one that looked
> better for you?

See commit 01ce1c6a9959b7 or the big comment in:
include/freetype/freetype.h

For best results you should use linear blending with stem darkening.

(But unfortunately stem darkening is only available when hinting is
enabled for TTF fonts. For CFF fonts you will get darkening even without
hinting. Hopefully this inconsistency gets fixed in the future.)

-- 
Markus



reply via email to

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