Fix precision errors in canvas textBaseline
For a long time when setting a textBaseline on canvas we have been rounding the returning values to always* use integers. This extra round operation seems to be unnecessary now and it is actually creating other alignment issues. This change fixes does alignment problems with no noticeable regressions. *For super tiny fonts (< 5px) we already returned floats. (crbug.com/338908) Bug: 890515 Change-Id: I099af9834aaf28bb2770e080bdb849eb729c18fd Reviewed-on: https://chromium-review.googlesource.com/c/1260210Reviewed-by:Fernando Serboncini <fserb@chromium.org> Commit-Queue: David Quiroz Marin <davidqu@chromium.org> Cr-Commit-Position: refs/heads/master@{#598758}
Showing
Please register or sign in to comment