[Fontconfig] Xft - (incorrect ?) subpixel filtering.
Mon, 26 May 2003 11:01:37 -0700
Around 22 o'clock on May 19, Yaroslav Rastrigin wrote:
> Limitations and drawbacks of this approach are obvious. First and foremost
> is unacessibility of pixel values outside of glyph's bitmap.
I've thought about using a wider filter; I'm glad you had a chance to
experiment with this. There's no reason you couldn't 'widen' glyphs by a
pixel to make the filtering work better; simply change the size of the
output RGBA image and adjust all of the metrics. That should let you
produce full RGBA pixels just beyond the current glyph bounds.
I do see an error in your code which may improve the output a bit:
hi1 = in[x ? x - 1 : x];
I think this should be:
hi1 = x ? in[x-1] : 0;
(similarly on the other end of the range). The input is transparent
beyond the bounds of the glyph.
Because all of the glyphs are precomposed before being applied to the
screen, this should do the right thing when displaying multiple glyphs.