|
From: | Nikolaus Waxweiler |
Subject: | Re: [ft-devel] gamma correction demo images |
Date: | Fri, 20 Nov 2015 19:08:06 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
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? Meaning: 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.
Werner, http://freetype.org/freetype2/docs/reference/ft2-lcd_filtering.html 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?
[Prev in Thread] | Current Thread | [Next in Thread] |