freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Alignment of top of capital letters to pixel grid, autohi


From: Werner LEMBERG
Subject: Re: [ft-devel] Alignment of top of capital letters to pixel grid, autohinter often 1 pixel off compared to unhinted outline
Date: Sat, 26 Sep 2015 21:17:45 +0200 (CEST)

> 1. Download
> https://www.google.com/fonts#UsePlace:use/Collection:Open+Sans
> 2. Load OpenSans-Regular.ttf in ftview, look at sizes 10, 13, 15, 19
> 3. Press A and B and compare where the bytecode and the autohinter
> align the top of capital letters, also press h to compare with the
> unhinted outline.

[At 10 ppem the auto-hinter *enlarges* glyphs, so you probably mean a
different size]

> I've noticed similar behavior by the autohinter in other fonts.
> Snapping 1 pixel too low like at the above sizes makes glyphs look
> like someone stepped on them, 1 pixel too high is a bit less of an
> issue I think, depending on the size.  Bytecode and the CFF hinter
> do that, too, sometimes, but e.g. the CFF hinter in general and the
> bytecode in this example give me a better overall consistency
> impression..
> 
> What is the cause and is there anything to be done about it?

The auto-hinter tries to align lowercase glyphs with the grid (cf. the
AF_BLUE_STRING_LATIN_SMALL string in file `afblue.dat', as used in the
AF_BLUE_STRINGSET_LATN set assigning the
AF_BLUE_PROPERTY_LATIN_X_HEIGHT property).  This is essential to
increase legibility at small sizes.  This alignment happens *before*
hinting; it is done by scaling all glyphs vertically.

Internally, the auto-hinter rounds the x-height more often up than
down, but if a there is a rounding down, the uppercase glyphs are also
scaled down, causing the effect you are observing.

Cf. the `increase-x-height' property as documented in `ftautoh.h'.


    Werner



reply via email to

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