# RuntimeError: Failed to process string with tex because of missing font metrics.

- **ID:** `python/matplotlib-pdf-font-embedding-error`
- **Domain:** python
- **Category:** system_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Using LaTeX text rendering (usetex=True) without a complete LaTeX installation or missing required fonts.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |

## Workarounds

1. **Install a full LaTeX distribution (e.g., TeX Live or MiKTeX)** (90% success)
   ```
   sudo apt-get install texlive-latex-base texlive-fonts-recommended
   ```
2. **Disable usetex and use Matplotlib's built-in math rendering** (95% success)
   ```
   plt.rcParams['text.usetex'] = False
   ```

## Dead Ends

- **Installing only matplotlib with pip** — LaTeX is a separate system; pip cannot install it. (95% fail)
- **Setting usetex=False but still getting error** — If usetex is False, this error should not occur; the setting might not have been reset. (80% fail)
