Unicode characters in python annotation

I am trying to use a unicode character in a python annotation, but it is being ignored. Am I doing something wrong or it is not possible?

I can see the character in the editor, but it does not show in the view. This is an extract of the python annotation (it is generated by a python script)

["dbT: 23.9°C\nRH: 61.0%\nws: 2.5m/s\nwd: 263.0°(←)",.....][t_index]

As you can see, the arrow symbol ← is there, but it does not show in the view


Any suggestion?

It should work but the string must contain utf8 characters. Have you checked the encoding?

I think so. The string is generated by a python script in this way

python_string = (",").join([f"\"dbT: {dbT}°C\\nRH: {rh}%\\nws: {ws}m/s\\nwd: {wd}°({angle_to_arrow(wd)})\"" for dbT, rh, ws, wd in zip(dbTs, rhs, wss, wds)])
pythonAnnotation2.Expression = f"[{python_string}][t_index]"

And I can actually see the symbol in the expression editor

I don’t think the embedded fonts in VTK have all of the fancy symbols.

1 Like

Use latex mode


Perfect! Thanks @mwestphal


1 Like