freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] gamma correction and FreeType


From: Antti Lankila
Subject: Re: [ft-devel] gamma correction and FreeType
Date: Fri, 8 Nov 2013 08:53:43 +0200

Søren Sandmann <address@hidden> kirjoitti 8.11.2013 kello 3.33:

> Søren Sandmann <address@hidden> writes:
> 
>> Suppose you have a checkerboard pattern where the squares are 25% and
>> 75% luminance (ie., measured in linear light) respectively. Then
>> consider two extremes:
>> 
>> 1. The squares are so tiny that they are impossible to distinguish. In
>>   this case the pattern will look like a solid 50% luminance, which
>>   corresponds to 186 in sRGB.
>> 
>> 2. The squares are so big that you can easily see them. In this case, if
>>   you had to choose one color to represent the whole pattern, you
>>   should pick the one that minimizes the overall perceptual error, for
>>   example by converting to sRGB, which is roughly perceptually uniform,
>>   and taking the average, producing an sRGB color of 118.
> 
> Looks like I botched the math here. In case 2, the resulting sRGB color
> would be 179, so there is not that much difference for these values.
> 
> The point remains though. Using using 0% and 100%, the difference is
> bigger: 186 in case 1, and 128 in case 2.

This is an interesting argument, but even if correct, I’m not sure what 
practical algorithm it would lend to. For instance, am I correct in 
interpreting that for antialiasing, you are suggesting that we should use gamma 
2.2 for small fonts, and gamma 1.0 for large fonts? In every case, I think the 
theory is ”wrong” in sense that diagonal lines become the more jagged the more 
used gamma value deviates from 2.2, and this will be the case regardless of 
what the edge dimensions are.

— 
Antti


reply via email to

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