[Fontations] Round advances when hinting is requested

Matches FreeType behavior, see [1], [2]. This minimizes rendering
differences between FreeType and Fontations in hinting set to kNone,
kSlight and kNormal.

Subpixel shifting on the path contour, similar to how it is done
manually in the FreeType backend, does not need to be done manually in
the Fontations backend. The SkScalerContext parent class functionality
already performs that.

[1] https://gitlab.freedesktop.org/freetype/freetype/-/blob/57617782464411201ce7bbc93b086c1b4d7d84a5/src/autofit/afloader.c#L422
[2] https://gitlab.freedesktop.org/freetype/freetype/-/blob/57617782464411201ce7bbc93b086c1b4d7d84a5/src/truetype/ttgload.c#L823

Fixed: skia:366430566
Cq-Include-Trybots: luci.skia.skia.primary:Build-Debian10-Clang-x86_64-Debug-Fontations,Build-Mac-Clang-x86_64-Debug-Fontations,Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-NativeFonts_Fontations,Test-Mac12-Clang-MacBookPro16.2-CPU-AppleIntel-x86_64-Debug-All-NativeFonts_Fontations
Change-Id: Ife1127df6cd045b765042cb142c236d6f09243f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/899916
Reviewed-by: Dominik Röttsches <drott@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Dominik Röttsches <drott@google.com>
1 file changed