freetype
[Top][All Lists]
Advanced

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

Re: [ft] anti-aliasing question


From: Dave Calkins
Subject: Re: [ft] anti-aliasing question
Date: Fri, 05 Feb 2010 15:56:07 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1

I looked at example1.c and its passing this in with the params arg for FT_Outline_Render.

I'm calling FT_Render_Glyph.  Any idea how I can setup a callback in this case?

On 2/5/2010 11:52 AM, Bruce Long wrote:

To register the call-back just set params.gray_spans=(FT_SpanFunc)yourCallBack.
I believe that example1.c does this and even provides a sample call-back that implements the threshold you are talking about.

Bruce

On Fri, Feb 5, 2010 at 6:21 AM, Dave Calkins <address@hidden> wrote:
On 1/31/2010 6:08 PM, Bruce Long wrote:
If you are using the 'grays' renderer you could always use the call-back routine. Then instead of assigning a value from 0 to 255 use a scaling factor to push the values closer to 255. Of course you glyphs will look a little fatter.

For example, add (say) 64 to each pixel value then if the result is > 255, set it to 255.

Or, multiply the pixel value by (say) 1.5. Then set any values >255 to 255.

(Tor, sorry I sent that to only you instead of reply -all.)


I'll give this a try.  Where/how do you register the callback routine?  As for "fatness" of the glyphs, maybe instead of pushing the values brighter, I could have a threshold and zero out anything below that threshold?




--
Give me immortality or give me death!

reply via email to

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