test_texmanager.py 459 B

123456789101112131415161718
  1. import matplotlib.pyplot as plt
  2. from matplotlib.texmanager import TexManager
  3. def test_fontconfig_preamble():
  4. """
  5. Test that the preamble is included in _fontconfig
  6. """
  7. plt.rcParams['text.usetex'] = True
  8. tm1 = TexManager()
  9. font_config1 = tm1.get_font_config()
  10. plt.rcParams['text.latex.preamble'] = ['\\usepackage{txfonts}']
  11. tm2 = TexManager()
  12. font_config2 = tm2.get_font_config()
  13. assert font_config1 != font_config2