New issue
Advanced search Search tips

Issue 859581 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Text not centred correctly with textAlign = 'center' if canvas has RTL direction, and text contains a flag emoji

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

Steps to reproduce the problem:
The attached file has examples of text containing flags and other emojis being drawn with textAlign = 'center' on canvases in LTR and RTL mode.

1. Run the snippet of JS in flag-emoji-textAlign.js
2. In the example containing a flag emoji, the centred text is drawn too far left in the dir=rtl case

What is the expected behavior?
The flag example should draw the text centred, as the other examples in the snippet do

What went wrong?
The text is drawn too far left in the RTL case

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 67.0.3396.99  Channel: stable
OS Version: OS X 10.13.4
Flash Version:
 
flag-emoji-textAlign.js
852 bytes View Download
Components: Blink>Canvas
Status: Untriaged (was: Unconfirmed)
Confirmed in stable + canary
Cc: fs...@chromium.org
Status: Available (was: Untriaged)
Owner: davidqu@chromium.org
Status: Assigned (was: Available)

Sign in to add a comment