google-chromeunicodefontsrenderingcombining-marks

Unicode Font Rendering Difference in Firefox, Chrome, and Safari


I was working on importing content from some files when I encountered this issue. Some of the unicode characters are rendered wrong in Chrome & Safari (not issues in Firefox).

The symbol in question is: र्इ

Screenshots from each browser below:

Firefox Firefox

Chrome Chrome

Safari Safari

I've found other pages using the same character (via a simple Google search) having same issue. Some examples below:

What is causing this? Is it due to invalid characters, or a font issue on the page?

The issue is with only a few characters. Most of the content is rendered just fine in all browsers.


Solution

  • The Devanagari glyph र्इ is a ligature, made up of three Unicode characters:

    1. (U+0930) Devanagari Letter Ra
    2. (U+094D) Devanagari Sign Virama
    3. (U+0907) Devanagari Letter I

    The second of these, Virama, is a diacritic used to indicate that the vowel sound which is normally part of the pronunciation of the letter to which it is attached should be suppressed in speech. When is combined with this diacritic, the resulting letter looks like this: र्

    Many pairs of Devanagari letters can combine to form ligatures. In Latin script, ligatures are usually similar to the letters from which they're formed – for example, æ is clearly recognisable as a combination of a and e – but this is not always the case: the ampersand & originated as a ligature for et, for example.

    In the example you've found, the comination of र् and can be written either as र्‌इ or र्इ 1 … the meaning is identical, and both are understood by readers of Devanagari script.

    So, both Firefox and Safari are displaying the characters correctly. Chrome isn't, which may be an issue with the font being used, or with Chrome itself.


    1 In Firefox on my machine, with a font capable of rendering the appropriate ligature, these two look different (because I added a Zero Width Non-Joiner in the middle of one but not the other). In the circumstances, your mileage may vary.