Xft - (incorrect ?) subpixel filtering.

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

 



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[0] = in[x ? x - 1 : x];

I think this should be:

		    hi1[0] = 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.

-keith





[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux