The space character width is wrong
markhu opened this issue · 1 comments
markhu commented
- Start a Google Docs document. Example: https://docs.google.com/document/d/119Ecj3CocpfK2G49rfxNQ1_SHLjDDReMO3UFROTvIUk/edit?usp=sharing
- type a lot of spaces with the Aref Ruqaa font
- it is easier to see if the spaces are at the beginning or middle of the string
- Notice how the cursor lags behind
It is hard to describe verbally, but it acts like the display-width of a space is about twice the position-width.
khaledhosny commented
I can’t edit this file, but it is a Google Docs bug. It is using the wrong glyph metrics since Aref Ruqaa has two different versions of space glyph, narrow one (default) for Arabic, and wider one for Latin. Here Google Docs is rendering with the wider one correctly (probably because it offloads this to the browser), but measuring cursor position with the wrong one (possibly because it does this itself).
Google Docs always give me weird cursor movement with Arabic fonts, probably for the same reasons.