title: Matplotlib missing font metrics file
body: <p>I was trying to use latex in matplotlib and got the following error:</p>
  <pre><code>File ~/Library/Python/3.8/lib/python/site-packages/matplotlib/dviread.py:474, in Dvi._fnt_def_real(self, k, c, s, d, a, l)
      472 tfm = _tfmfile(fontname)
      473 if tfm is None:
  --&gt; 474     raise FileNotFoundError(&quot;missing font metrics file: %s&quot; % fontname)
      475 if c != 0 and tfm.checksum != 0 and c != tfm.checksum:
      476     raise ValueError('tfm checksum mismatch: %s' % n)
  
  FileNotFoundError: missing font metrics file: cmss17
  
  &lt;Figure size 432x288 with 1 Axes&gt;
  </code></pre>
  <p>All I did was</p>
  <pre><code>import matplotlib.pyplot as plt
  import matplotlib as mpl
  
  mpl.rcParams[&quot;text.usetex&quot;] = True
  mpl.rcParams[&quot;text.latex.preamble&quot;] = r&quot;\usepackage{amsmath}&quot;
  plt.rcParams[&quot;font.size&quot;] = 18
  
  plt.plot([0, 1], [2, 3])
  </code></pre>
  <p>Any ideas on how to setup the font metrics file? I did try to install the cmss17 font, however, it did not help, I am still getting this error. I am using an M1 Mac.</p>
  <p>Thanks in advance!</p>