Re: [ft] anti-aliasing question

2010-02-09 Thread Dave Calkins
The header says R=G=B as opposed to what? If this flag isn't set, you'll get, for example, instead of a 5-pixel buffer (without LCD rendering) ABCDE a buffer which triples each pixel value: AAABBBCCCDDDEEE According to the information in the web, patents on the ClearType idea

Re: [ft] anti-aliasing question

2010-02-09 Thread Werner LEMBERG
In order for sub-pixel rendering to work, if I understand what I read in that link correctly, the R, G, and B values will not be equal, since they're providing the sub-pixels on an LCD screen. Correct. The comment indicates the enabling this flag activates sub-pixel rendering, yet it later

Re: [ft] anti-aliasing question

2010-02-09 Thread Werner LEMBERG
So if I do the below: - enable FT_CONFIG_OPTION_SUBPIXEL_RENDERING in ftoption.h - call FT_Library_SetLcdFilter with FT_LCD_FILTER_DEFAULT - use FT_RENDER_MODE_LCD when calling FT_Render_Glyph Then, the result of FT_Render_Glyph will be a 24-bit (8 bits for each red,green,blue) color

Re: [ft] anti-aliasing question

2010-02-08 Thread Dave Calkins
On 2/8/2010 12:52 AM, Werner LEMBERG wrote: Is there an LCD mode which does not grow the image size? No. You need three colour channels for LCD rendering. I'll read through that link you sent on ClearType. Just to make sure I'm understanding you though, if I have a

Re: [ft] anti-aliasing question

2010-02-07 Thread Dave Calkins
I checked and the flags you mentioned were not setup as suggested. I'll change those and rebuild. What steps are involved in enabling LCD rendering? Is it just a flag to load glyph/render glyph? Just want to make sure I'm doing a proper test of it. On 2/7/2010 1:27 AM, Werner LEMBERG

Re: [ft] anti-aliasing question

2010-02-07 Thread Dave Calkins
Two things are necessary: . Use an LCD rendering mode (FreeType offers four of them). Is there an LCD mode which does not grow the image size? I see FT_RENDER_MODE_LCD and LCD_V which both indicate that they produce larger-than-normal bitmaps. I tried FT_RENDER_MODE_LCD and of

Re: [ft] anti-aliasing question

2010-02-07 Thread Werner LEMBERG
I changed the flags as you suggested, rebuilt, and tested it again. I've attached a screenshot. I'm not sure how much of a difference it made though. Hopefully, you don't use FT_LOAD_NO_HINTING. Otherwise the activated bytecode interpreter does nothing. Werner

Re: [ft] anti-aliasing question

2010-02-07 Thread Dave Calkins
Interestingly, FreeTypeGL does use FT_LOAD_NO_HINTING by default. Not sure why, but I have changed that and have it just using FT_LOAD_DEFAULT. Something else I thought was to just manually filter the pixels after the call to FT_Render_Glyph. Perhaps set any pixels below a certain

Re: [ft] anti-aliasing question

2010-02-07 Thread Tor Andersson
Dave, On Sun, Feb 7, 2010 at 2:39 PM, Dave Calkins d...@kinematics.com wrote: I changed the flags as you suggested, rebuilt, and tested it again.  I've attached a screenshot.  I'm not sure how much of a difference it made though. That looks a lot more like it should. Compare the shape of the

Re: [ft] anti-aliasing question

2010-02-07 Thread Dave Calkins
On 2/7/2010 9:00 AM, Werner LEMBERG wrote: Is there an LCD mode which does not grow the image size? No. You need three colour channels for LCD rendering. What is the format of the bitmap memory when FT_PIXEL_MODE_LCD is in place? The docs say 8-bit, but it being 3x as wide

Re: [ft] anti-aliasing question

2010-02-07 Thread Werner LEMBERG
Is there an LCD mode which does not grow the image size? No. You need three colour channels for LCD rendering. What is the format of the bitmap memory when FT_PIXEL_MODE_LCD is in place? The docs say 8-bit, but it being 3x as wide suggests maybe 1 byte for each color component? Yes. I

Re: [ft] anti-aliasing question

2010-02-06 Thread Tor Andersson
On 2/5/10, Dave Calkins d...@kinematics.com wrote: On 2/5/2010 11:50 AM, Tor Andersson wrote: On Fri, Feb 5, 2010 at 2:19 PM, Dave Calkinsd...@kinematics.com wrote: I switched to using the default load flags (as opposed to the no hinting flag which was being passed by FreeTypeGL), but this

Re: [ft] anti-aliasing question

2010-02-06 Thread Dave Calkins
I'm not certain which transform you're referring to though. I'm referring to the third parameter of FT_Set_Transform, but you should also check your OpenGL transform matrices and the texture sampling mode. I searched through the FreeTypeGL source and they are not calling

Re: [ft] anti-aliasing question

2010-02-06 Thread Werner LEMBERG
Are you sure this isn't an effect related to ClearType rendering? Is ClearType rendering something being done by GDI? Or is this something I need to use with FreeType? ClearType basically means that you render a glyph with a much increased horizontal resolution (at least using a factor 

Re: [ft] anti-aliasing question

2010-02-06 Thread Werner LEMBERG
I've attached 2 screenshots, one rendered with GDI and the other with FreeType using FreeTypeGL. On each screenshot I've also zoomed into the rendered text. Well, FreeType doesn't do LCD rendering in this image... You should activate this. Secondly, are sure that you have activated the

Re: [ft] anti-aliasing question

2010-02-05 Thread Dave Calkins
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.

Re: [ft] anti-aliasing question

2010-02-05 Thread Dave Calkins
You get less blurrier output if you don't do subpixel position of glyphs. How do I control whether or not subpixel positioning of the glyphs occurs? What is the translation component of the transform? If it is non-zero then the grid fitting won't help against blurriness

Re: [ft] anti-aliasing question

2010-02-05 Thread Dave Calkins
On 2/5/2010 4:17 PM, Dave Calkins wrote: You get less blurrier output if you don't do subpixel position of glyphs. How do I control whether or not subpixel positioning of the glyphs occurs? What is the translation component of the transform? If it is non-zero then the grid fitting won't

Re: [ft] anti-aliasing question

2010-02-01 Thread Werner LEMBERG
Even if there isn't a public method to do it, I wouldn't mind changing the code internally if it would let me tune down the anti-aliasing a little bit. You get less blurrier output if you don't do subpixel position of glyphs. The current text looks fuzzy (according to the users) when

Re: [ft] anti-aliasing question

2010-02-01 Thread Werner LEMBERG
However, the source code for the bytecode interpreter is still available and can be toggled on at compile time, for those that want to use it anyway (because they purchased a license from Apple, or because they are in a country where the patents do not apply, etc.). I think the patent has

Re: [ft] anti-aliasing question

2010-01-31 Thread Dave Calkins
I checked the FreeTypeGL source and it looks like its passing in the below values. For FT_Load_Glyph, FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP For FT_Render_Glyph, FT_RENDER_MODE_NORMAL Experimenting with these hasn't seemed to have any effect on the amount of smoothing (whether

Re: [ft] anti-aliasing question

2010-01-31 Thread Tor Andersson
On Sun, Jan 31, 2010 at 10:23 PM, Dave Calkins d...@kinematics.com wrote: I checked the FreeTypeGL source and it looks like its passing in the below values.    For FT_Load_Glyph, FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP    For FT_Render_Glyph, FT_RENDER_MODE_NORMAL Experimenting with these

Re: [ft] anti-aliasing question

2010-01-31 Thread Dave Calkins
Still haven't found the answer to this. However, if I'm correct in saying that FreeType is generating a grayscale rendering of the glyph using anti-aliasing, then is there some way to control how much anti-aliasing FreeType applies when its rendering the glyph? No. It's either

Re: [ft] anti-aliasing question

2010-01-31 Thread Tor Andersson
On Sun, Jan 31, 2010 at 11:58 PM, Dave Calkins d...@kinematics.com wrote: Still haven't found the answer to this.  However, if I'm correct in saying that FreeType is generating a grayscale rendering of the glyph using anti-aliasing, then is there some way to control how much anti-aliasing

Re: [ft] anti-aliasing question

2010-01-31 Thread Dave Calkins
On a related note, do I run into patent/license issues as a result of hinting? I recall reading that on the FreeType site and based on that description am thinking that using the hinting might actually mean I need to secure a license. At what point, in regards to the hinting in FreeType do

Re: [ft] anti-aliasing question

2010-01-29 Thread Dave Calkins
On 1/28/2010 12:51 PM, Tor Andersson wrote: On Tue, Jan 26, 2010 at 5:14 PM, Dave Calkinsd...@kinematics.com wrote: When comparing FreeType text rendering (in OpenGL via FreeTypeGL) with Windows GDI text rendering, it appears that FreeType is applying more aggressive anti-aliasing effects.

Re: [ft] anti-aliasing question

2010-01-28 Thread Massimo DZ8
Side note: ... taking the output of FreeType and putting it in a texture ... note the removal of 3d 3D textures are volumes with stp texture coordinates, GL_TEXTURE_3D (not to be confused with cube textures, as in GL_TEXTURE_CUBE_MAP, also using stp coords). for standard text, standard

Re: [ft] anti-aliasing question

2010-01-28 Thread Massimo DZ8
Dave Calkins ha scritto: I downloaded the demo file, however, I'm building on Windows with VC++ 2005, so its not gonna be easy to build and run the demo. Can you point me to where in the source to find the anti-aliasing control? ftview.c I have to correct myself however, the degree of control

Re: [ft] anti-aliasing question

2010-01-28 Thread Dave Calkins
On 1/28/2010 11:22 AM, Massimo DZ8 wrote: Dave Calkins ha scritto: I downloaded the demo file, however, I'm building on Windows with VC++ 2005, so its not gonna be easy to build and run the demo. Can you point me to where in the source to find the anti-aliasing control? ftview.c I have to

Re: [ft] anti-aliasing question

2010-01-28 Thread Tor Andersson
On Tue, Jan 26, 2010 at 5:14 PM, Dave Calkins d...@kinematics.com wrote: When comparing FreeType text rendering (in OpenGL via FreeTypeGL) with Windows GDI text rendering, it appears that FreeType is applying more aggressive anti-aliasing effects. The GDI text is anti-aliased, just not as

[ft] anti-aliasing question

2010-01-26 Thread Dave Calkins
When comparing FreeType text rendering (in OpenGL via FreeTypeGL) with Windows GDI text rendering, it appears that FreeType is applying more aggressive anti-aliasing effects. The GDI text is anti-aliased, just not as much. The FreeType text looks much smoother. I'm curious, are there

Re: [ft] anti-aliasing question

2010-01-26 Thread Werner LEMBERG
I'm curious, are there parameters to fine-tune how much anti-aliasing is applied? I have no idea how this is controlled in OpenGL; you might try the `ftdiff' demo program to compare the various hinting and rendering modes of FreeType. Werner

Re: [ft] anti-aliasing question

2010-01-26 Thread Dave Calkins
ok, thanks. I'll check that out. On 1/26/2010 11:36 AM, Werner LEMBERG wrote: I'm curious, are there parameters to fine-tune how much anti-aliasing is applied? I have no idea how this is controlled in OpenGL; you might try the `ftdiff' demo program to compare the various hinting and