freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] ClearType-like results


From: Yaroslav Rastrigin
Subject: Re: [Devel] ClearType-like results
Date: Tue, 20 May 2003 22:08:27 +0400
User-agent: KMail/1.5.1

Hi !
On Saturday 17 May 2003 10:53, Werner LEMBERG wrote:
> > Because the glyphs are not filtered, you'll experience unpleasant
> > color frings in the output of "ftview".  For now, this is normal,
> > though we may want to add filtering to the "ftview" program, or add
> > a new API like FT_Set_RGB_Filter(..) to make it part of the engine
> > some day.
>
> This would be very nice.  I tried to do that but I failed since I lack
> the necessary background information how the filter and blending
> operations have to be done correctly.  If someone can give me a
> precise recipe I will add it to ftview.  Don't point me to
> http://grc.com, it lacks the information how to convert anti-aliased
> glyphs -- the sketched outline works for bitmaps only.
>
Well, I've investigated this topic somewhat further (Detailed description was 
sent to address@hidden, and is waiting moderator's approval (I've 
forgot to subscribe to this list, and too lazy/too polite to send it twice 
:-)). Briefly - Xft subpixel filter produces very questionable results, 
either by design or by implementation. What's worse - there's no way to 
produce _substantially_ better results with current implementation of 
XftFontLoadGlyphs() (xftglyphs.c) (Or, probably, I can't see one), because 
now it filters one glyph at time, with respect to glyph's bounds. Subpixel 
smoothing, OTOH, needs to access glyph's neighbouring pixels (both original 
values and filtered outcome). For 3- or 5-level filter described on grc.com, 
you'll need to access one more pixel on the left and one on the right side of 
the glyph's rendered bitmap. I've implemented sample 3-level filter for Xft, 
and it produces "better", or, at least, more "ClearType"-like results, 
although color fringing is quite noticeable sometimes. To achieve really 
interesting output, one would need to filter whole string (first, render it 
with 3x horiz. resolution, and then filter this buffer).
-- 
With all the best, yarick at relex dot ru.




reply via email to

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