Improve rounding of projection vector versors
authorPo Lu <luangruo@yahoo.com>
Tue, 2 Jan 2024 04:26:57 +0000 (12:26 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 2 Jan 2024 04:27:19 +0000 (12:27 +0800)
commitce7a95711c0746eb7320ea18799b66599764c49a
treec41eedc0595f0acc0e4b055efa7be6b3976a90a1
parentf77840a5526e40c381a9208a0c5097f652be8e03
Improve rounding of projection vector versors

* src/sfnt.c (sfnt_short_frac_dot): New function.
(sfnt_validate_gs): Guarantee dot product of freedom and
projection vectors are properly rounded.  If the final product
is short of 1/16th of a vector, reset it to an entire vector.
src/sfnt.c