enthought / enthought/mayavi

Incorrect text() font with LaTeX (Bug or feature?)

Open
#956 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.4k
Forks
316
Avg merge
7h 44m
Merged PRs (30d)
5

Description

When using text() with plain text the font family can be changed.
When using text() with a LaTeX expression the font family can not be changed, only Arial results. Is this a bug or a feature?

Example:
______________________________
import numpy as np
from mayavi import mlab

data = np.random.random((3, 3, 3))
src = mlab.pipeline.scalar_field(data)

# Correct: Times font displayed
plain_text = mlab.text(0,0, r'Times_1', z=0.1)
plain_text.property.font_family = 'times'

# Incorrect: Arial font displayed when using LaTeX
LaTeX_text = mlab.text(0,0, r'$Times_1$', z=-0.1)
LaTeX_text.property.font_family = 'times'

mlab.show()
_______________________________

![Text_Latex_font_test_result](https://user-images.githubusercontent.com/69220514/90306246-1c09fa80-de99-11ea-809b-ff3ae79d9aec.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.