enthought / mayavi

3D visualization of scientific data in Python
http://docs.enthought.com/mayavi/mayavi/
Other
1.3k stars 284 forks source link

display text using TTF font #1144

Open fred4ets opened 2 years ago

fred4ets commented 2 years ago

Hi,

I know that VTK/Mayavi can only use the 3 fonts (arial, courier & times) to display text, but I see that there is a "font file" field in Axes module for instance.

How is it supposed to be used?

If I set a font file with full path, it does not change anything, text is still displayed with arial/courier/times font.

Any idea?

Thanks in advance.

Regards

solarjoe commented 2 years ago

I have the same question and also opened up a question on SO.

I was looking at the source of TextProperty on on how to set a font file directly, but could not find a solution.