Skip to content

[autofit] Fix double division in stem darkening.

Tatsuyuki Ishi requested to merge ishitatsuyuki/freetype:embolden into master

The old code used to divide the darkening amount by em_ratio twice, leading to unnecessarily bold stems on certain fonts with higher units per em (e.g. Inter). This patch fixes it.

The return value of af_loader_compute_darkening was also changed to use 16/16 fixed point to get rid of a redundant truncation operation. This should slightly improve the precision, although it's still bottlenecked by the emboldening function, which uses 26/6 fixed point.

Merge request reports