Fix emoji drawing coordinate in vertical text
Due to issues we have with retrieving correct font metrics on Mac OS, due to [1, 2] when computing the vertical origin for Emoji Color Emoji we receive an incorrect vertical origin with a 0 y-value, which leads to an emoji glyph being placed too high. Fallback to retrieving the slightly inflated SkFont.getBounds when SkPath + getBounds() returns an empty rectangle, as it does for Apple Color Emoji. Added emoji-vertical-origin-visual.html test as part of own tests, but in the style of a WPT test. As far as I can tell, we cannot yet run pixel tests as part of WPT but I do not see a way to verify our rendering as a ref test. [1] https://bugs.chromium.org/p/skia/issues/detail?id=8779 [2] https://bugs.chromium.org/p/skia/issues/detail?id=5328 Test: fast/text/emoji-vertical-origin-visual.html Bug: 933264 Change-Id: I3487bf832b857764fb638a3f2df5803137d3fd66 Reviewed-on: https://chromium-review.googlesource.com/c/1480463 Commit-Queue: Koji Ishii <kojii@chromium.org> Auto-Submit: Dominik Röttsches <drott@chromium.org> Reviewed-by:Koji Ishii <kojii@chromium.org> Cr-Commit-Position: refs/heads/master@{#634836}
Showing
12.9 KB
20.9 KB
21 KB
18.8 KB
18.4 KB