brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.96k stars 2.35k forks source link

Coptic text in Roboto renders incorrectly #15238

Open rillian opened 3 years ago

rillian commented 3 years ago

Description

Coptic text sometimes renders incorrectly on Android, with the first two letters of a word superimposed.

Steps to reproduce

  1. Visit the Coptic language wikipedia page from an Android device.
  2. Note the rendering of the word ϯⲙⲉⲧⲣⲉⲙⲛ̀ⲭⲏⲙⲓ on the first line.
  3. Compare with the same page on desktop, or to the same word in the info box lower down on the page.

Or see this simpler example.

Actual result

The initial ϯ and ⲙ letters are drawn on top of each other.

Expected result

The word should be rendered with correct spacing between the letters.

Issue reproduces how often

It seems to happen reliably on page load. Sometimes when I switch back to the tab later it renders correctly.

I can also reproduce with the stock Android browser, so it's probably a Chrome bug.

In my testing it seems to be related to pages requesting the Roboto font on Android. Other fonts work fine, including the default, which might also be Roboto?

Version/Channel Information:

Reproduced with the latest stable apk from github.

Device details

Brave version

Brave 1.22.71, Chromium 89.0.4389.114

Website problems only

Additional information

rillian commented 3 years ago

Example of the incorrect rendering Brave-Coptic_20210411-210059

rillian commented 3 years ago

I'm having some luck reducing a test case now. Will post if I get something reasonably minimal.

rillian commented 3 years ago

Seems to be specific to requesting the Roboto font in the wikipedia css. I constructed a minimal test page comparing rendering with Roboto and the default font, which shows the rendering problem.

<p style="font-family: Roboto">ϯⲙⲉⲧⲣⲉⲙⲛ̀ⲭⲏⲙⲓ</p>

Note that Roboto in other contexts, like the notes app, renders the text correctly.