[Top][All Lists]

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

Re: [ft-devel] gamma correction demo images

From: Dave Arnold
Subject: Re: [ft-devel] gamma correction demo images
Date: Fri, 20 Nov 2015 19:11:57 +0000

Yes, the only difference in blending is that subpixel mode does it 3 times per 

The filter is color-balanced, but not normalized. Values above 0x100 will have 
to be clamped and this non-linearity causes distortion and adds to color 
fringing. Stem darkening is the better way to increase contrast.

From: address@hidden <address@hidden> on behalf of Nikolaus Waxweiler 
Sent: Friday, November 20, 2015 10:08 AM
To: address@hidden
Subject: Re: [ft-devel] gamma correction demo images

> I did not work on subpixel rendering in FreeType, but I assume it is
> similar to what Adobe does. Here is a brief summary.

I'm currently writing up the documentation for ftautoh.h, do I
understand correctly that the steps for linear alpha blending and gamma
correction of gray and subpixel-rendered glyphs are exactly the same?
1. Take the foreground and background colors (e.g., in sRGB space) and
apply gamma to get them in a linear space.
2. Blend the two linear colors using the alpha value from the glyph's
coverage bitmap
3. Apply inverse gamma (e.g. 1.8) to the blended pixel and write it back
to the image.

> The density computed for each subpixel must be distributed equally to
> all color channels.

suggests [0x10, 0x50, 0x60, 0x50, 0x10] as a possible LCD filter to use
when doing LAB+GC. Is this correct and does what Dave suggests here? The
sum seems to go above 0x100? And if it is, would it make a good
candidate for a new FT_LCD_FILTER_EQUAL_WEIGHT that LAB+GC-enabled libs
can set?

Freetype-devel mailing list

reply via email to

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