Add stem width cache in bytecode.
commit37e1e7eb36509fd46a8e23eb5ef100833ea5f21d
authorWerner Lemberg <wl@gnu.org>
Tue, 5 Dec 2017 11:26:36 +0000 (5 12:26 +0100)
committerWerner Lemberg <wl@gnu.org>
Tue, 5 Dec 2017 11:26:36 +0000 (5 12:26 +0100)
tree73cf9d3a7d950a5d857e2adbc5430dae9e7025d1
parent7fc481677d8746965c3052dd2575fad776796c0b
Add stem width cache in bytecode.

The bytecode to compute stem widths has code that tries to compensate double
rounding of stem positions, cf. commit fc5f7ccc.  In some cases this can
lead to different hinted stem widths even if the unhinted widths are
identical.

The code in this commit introduces a stem width cache to circumvent the
issue.  Its idea is that the result of the first computation of a hinted
stem width takes care of double rounding effects, but all other stems with
the same width do not.  Instead, the cached first value gets used.
lib/tabytecode.h
lib/tafpgm.c