Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1721612 - Fix AdjustAdvancesForSyntheticBold to reliably handle n…
…egative adjustments. r=gfx-reviewers,lsalzman This method (as its name suggests) was originally created to handle synthetic-bold, which only ever increases the advance, and so its use of an unsigned value for the adjustment worked ok. But when applying tracking, the adjustment may be negative, and assigning this to a uint32_t value takes us into undefined-behavior territory. It seems this worked "as expected" on x86_64 (using modulo arithmetic), but on arm64 the value just clamped to zero, and the intended negative tracking doesn't get applied. Making it an int32_t results in consistent behavior across both architectures. Differential Revision: https://phabricator.services.mozilla.com/D193288
- Loading branch information