Search code examples
python-3.xunicodepython-unicode

Unicode subscript r inconsistent


I want to use the following unicode characters in python to display the unit W_rms.

However it seems the subscript "r" is different to the others:

W_rms

I used the following codes:

>>> print('w\u1d63\u2098\u209b')
wᵣₘₛ

Any help is appreciated.

I tried to change the order of the codes, did not resolve the issue.


Solution

  • It depends on your font. The differing characters use a fallback font when the one used doesn't support the glyph. In Windows Notepad for example, Cambria font looks perfect, but Consolas looks like your image. According to the Character Map utility, Consolas doesn't define the "ms" characters, but Cambria does.

    Consolas: Consolas font image

    Cambria: Cambria font image