Skip to content

Instantly share code, notes, and snippets.

@ScottKirvan
Last active May 3, 2023 18:53
Show Gist options
  • Save ScottKirvan/825e4b0df47b02cbc1d69e978bbcfcf9 to your computer and use it in GitHub Desktop.
Save ScottKirvan/825e4b0df47b02cbc1d69e978bbcfcf9 to your computer and use it in GitHub Desktop.
Package fontspec Error: The font "TimesNewRoman" cannot be found. - resolved

fontspec error in WSL

Using latex/luatex in WSL, you may find yourself wanting to grab fonts you're used to working with, like TimesNewRoman. Microsoft Fonts aren't available and usable by default.

I believe there's a way to make WSL see the existing Windows system fonts, but here's another quick fix that will work on any Ubuntu/Debian install.

The error:

Package fontspec Error: The font "TimesNewRoman" cannot be found.

To fix, install ttf-mscorefonts-installer:

sudo apt install ttf-mscorefonts-installer

#latex #lualatex #fontsspec #timesnewroman #setmainfont #wsl #wsl2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment