[Fontations] Simplify glyph path based on overlap flag, sanitize paths
Port path santiziation (mainly to drop empty draws and force-inserting a
starting moveTo()'s and close()'s if needed) from FreeType backend.
Hook up Skrifa Scaler's ScalerMetrics flag. This flag represents the
OpenType glyf table's overlap flag and is then used in the same way as
the FreeType backend: To simplify the paths and fix their winding rule,
in order to allow stroking.
Preparation for extensive glyph path comparison testing between
Fontations and FreeType backend. With this CL, 100% of the tests in
[1] pass.
[1] https://skia-review.googlesource.com/c/skia/+/741536/4/tests/FontationsFtCompTest.cpp
Bug: skia:298018421
Change-Id: Ib3c93492b2d855e3f5c14adef85ae7d414af26c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/748956
Commit-Queue: Dominik Röttsches <drott@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
3 files changed