Re: [ft-devel] optimal configuration to render fonts using gamma correction

2012-08-08 Thread Francesco Abbate
Hi all,

I'm sorry I've disturbed this ML with my unclear questions. I did
found out by myself how to have optimal font rendering. What I was
missing was vertical font hinting because I was freely translating the
y coordinate by fractional amount so that vertical hinting was
actually lost. I understood now that vertical hinting is *very*
important to have good looking fonts.

Otherwise other important things I found out to have optimal rendering are:
- antialising (of course) with subpixel rendering (very important) =
the gamma value is less important but it seems to me that a gamma of
1.5 is a very good comprimise. You can also completely drop gamma
correction and still it goods fine.
- you can turn FT_LOAD_FORCE_AUTOHINTING since freetype autohinting
seems to give excellent results
- optionally activate FT_LOAD_TARGET_LCD and FT_LOAD_TARGET_LIGHT but
without this latter the hinting is may be better (found out about them
looking in libXft source code)
- disable the font hinting along the horizontal axis (achieved by
doing a x100 scale transform along x before loading the glyph)
- use font kerning with fractional positioning along x and without
rounding of the coordinates

With all these attentions the results turns out to be excellent on the
par with the better font system I know of. I found also that the
results are better that Windows's ClearType (at least on XP), this
latter does have too much colored fringes for my taste.

Here a sample of the results that I obtain: http://imagebin.org/223827

I hope this can be helpful for other people since it took me a lot of
time to figure out all the details.

Best regards,
Francesco

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] optimal configuration to render fonts using gamma correction

2012-08-01 Thread Francesco Abbate
 What do you mean by washed out?  _What's_ washed out?  Regardless
 of what curve your grey-levels use, white should be white, and black
 should be black, and fonts are mostly black and white

Hi,

I'm sorry I was not clear to express the problem. By washed out I
meant that, like in image http://imagebin.org/222768 the text is too
much clear. To make an objective comparison I have compared the same
text rendered with google chrome on ubuntu and gsl shell. The image is
here:

http://imagebin.org/222920

The text rendered with chrome is clearly more dark, more crisp, while
with my rendering pipeline the text is quite clear. This is probably
normal with antialising and gamma correction since the pixel does not
have a 100% coverage but the final results, even if correct, does look
too much clear, washed out as I was saying before.

I guess that google chrome does use libxft on linux to render text so
probably it is a the level of libxft that the rendering pipeline is
defined. I'm wondering if they are using gamma correction or not, if
it is the hinting that make the difference or if they use other
special methods to increase font crispness.

Francesco

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] optimal configuration to render fonts using gamma correction

2012-07-31 Thread Behdad Esfahbod
On 07/31/2012 01:51 PM, Francesco Abbate wrote:
 I believe that gamma correction is necessary to render properly
 antialiased graphics but when I render the text with gamma correction
 it looks too much light, almost washed out.

An extremely powerful way to evaluate whether your gamma is correct is to use
fore / back colors of the same luminosity but different hue.  Then if your
gamma is correct, the blending edges should have the same luminosity as the
fore / back colors.  See for example:

  http://people.freedesktop.org/~sandmann/srgb.png

BTW, I've observed the same behavior that you observed in GLyphy.

behdad

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] optimal configuration to render fonts using gamma correction

2012-07-31 Thread Francesco Abbate
2012/7/31 Behdad Esfahbod beh...@behdad.org:
 On 07/31/2012 01:51 PM, Francesco Abbate wrote:
 An extremely powerful way to evaluate whether your gamma is correct is to use
 fore / back colors of the same luminosity but different hue.  Then if your
 gamma is correct, the blending edges should have the same luminosity as the
 fore / back colors.  See for example:

   http://people.freedesktop.org/~sandmann/srgb.png

Very interesting indeed. I've made the test and it seems that my (AGG)
gamma correction is done right.

http://imagebin.org/222801

If I disable gamma correction and subpixel rendering the quality get
clearly worst.

So the problem is still standing about why fonts looks washed with
gamma correction. More important too, what is the better method to
render fonts ? Disable gamma corrections ?

Francesco

___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] optimal configuration to render fonts using gamma correction

2012-07-31 Thread Miles Bader
Francesco Abbate francesco@gmail.com writes:
 So the problem is still standing about why fonts looks washed with
 gamma correction. More important too, what is the better method to
 render fonts ? Disable gamma corrections ?

What do you mean by washed out?  _What's_ washed out?  Regardless
of what curve your grey-levels use, white should be white, and black
should be black, and fonts are mostly black and white

[I guess you want to do any blending in a linear space
(non-gamma-corrected), but obviously whatever you hand off to the
display system should be in whatever space the display system
expects...]

-miles

-- 
We are all lying in the gutter, but some of us are looking at the stars.
-Oscar Wilde


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] optimal configuration to render fonts using gamma correction

2012-07-31 Thread Miles Bader
I wrote earlier:
 [I guess you want to do any blending in a linear space
   ^ and interpolation too, of course!

 (non-gamma-corrected), but obviously whatever you hand off to the
 display system should be in whatever space the display system
 expects...]

-- 
Apologize, v. To lay the foundation for a future offense.


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel