TTF_SetFontHinting question

I don’t entirely understand why TTF_SetFontHinting() is having the effect it is, and I wonder whether I’m doing something wrong.

Here are the results I’m getting from the four hinting types (NORMAL, LIGHT, MONO and NONE) for three different fonts. In each case TTF_HINTING_LIGHT is giving subjectively identical results to TTF_HINTING_NONE, which is not what I would have expected:


This is the description of FreeType’s hinting :

Which should be used with a FreeType render mode:

If you use the *Solid function, SDL_ttf picks FT_RENDER_MODE_MONO, otherwise it uses FT_RENDER_MODE_NORMAL.

I’m always using TTF_RenderUNICODE_Blended(), the differences I’m seeing are from changing the TTF_SetFontHinting() mode and nothing else.

Does it not surprise you that TTF_HINTING_LIGHT and TTF_HINTING_NONE seem to be giving identical results?

@rtrussell if you zoom in, with some graphic editor, you can see some small difference in gray values even between light and none. This is the hinting !

Indeed there are small differences, here is an animated GIF for comparison:

But given that the documentation says: “the font may become very blurry or messy at smaller sizes” I would have expected a much greater difference. And it surprises me that TTF_HINTING_NONE is most similar to LIGHT rather than NORMAL.

this is what suggests the freetype documentation:

Many generated glyphs are fuzzier but better resemble their original shape.

So Light looks like None.
Then, there is normal which is optimized for standard gray-level rendering.

   *     The default hinting algorithm, optimized for standard gray-level
   *     rendering.  For monochrome output, use @FT_LOAD_TARGET_MONO instead.
   *     A lighter hinting algorithm for gray-level modes.  Many generated
   *     glyphs are fuzzier but better resemble their original shape.  This
   *     is achieved by snapping glyphs to the pixel grid only vertically
   *     (Y-axis), as is done by FreeType's new CFF engine or Microsoft's
   *     ClearType font renderer.  This preserves inter-glyph spacing in
   *     horizontal text.  The snapping is done either by the native font
   *     driver, if the driver itself and the font support it, or by the
   *     auto-hinter.