This is a lot tougher question than I expected it to be.

How do I:

  • a) add fonts to TeX from previous releases?

  • b) I change the call in my document from a previous-release default font, to a preferred current-release font?

My Config (in file structure.tex) is calling for:


\usepackage[T1]{fontenc} % Output font encoding for international characters
\usepackage[utf8]{inputenc} % Required for inputting international characters

\usepackage{XCharter} % Use the XCharter font

The error I get is on running the compile:

Font TS1/XCharter-TLF/m/n/10=XCharter1-Roman-ts1 at 10.0pt not loadable: Metric (TFM) file not found.

I think that I found the missing font file on CTAN in the XCharter bundle and downloaded it, but I can't see instructions on how to now apply nor install new fonts on Windows. It appears as though all of the docs are written for Mac or Linux?

  • xcharter was broken some days ago. But miktex got the update now, so check if there are updates (in user and admin mode). – Ulrike Fischer Dec 3 '20 at 19:41
  • 1
    According to miktex.org it is still the faulty version 1.212 that gets distributed. I was able to solve the problem by manually installing the font (v 1.213) with the files from CTAN, but i already had the existing folder structure (MiKTeX\fonts\afm\public\xcharter, MiKTeX\fonts\enc\dvips\xcharter, MiKTeX\fonts\maps\dvips\xcharter, MiKTeX\fonts\tfm\public\xcharter, MiKTeX\fonts\type1\public\xcharter, MiKTeX\fonts\vf\public\xcharter and the tex folder MiKTeX\tex\latex\xcharter). Then I did refresh the file name database and the font map files in the MiKTeX console (admin + user). – gerdji Dec 4 '20 at 6:58

On Windows, you would put the package in your MikTeX user data directory (probably under the subdirectory of %USERPROFILE%\Local\MiKTeX\ for your version) or you can register an extra TEXMF root directory in MikTeX, by opening the MikTeX Console and navigating to Settings > Directories > Add. You would want to unpack all the files from the package to the same subdirectory, so that you can uninstall it easily when a new version comes out. You also want to download the entire package to your local TEXMF tree, overriding the files that came with your distribution, instead of trying to download only the files that appear to be missing, which would result in mixing-and-matching files from different versions.

You could instead install an .otf or .ttf font for all users and then use it with fontspec. Installing it without Administrator privileges would not work.

You can also put any files you need for a single project in the project directory.

If you installed any legacy 8-bit fonts, you must run texhash and updmap-sys to be able to find them. If you install any modern fonts, you can optionally run fc-cache -f -s -v and luaotfload-tool -f -u -p -v to update your caches.

  • The error shows TS1 encoding and the code snippet loads fontenc. So why do you believe that the problem is solved by installing fonts for fontspec? – Ulrike Fischer Dec 4 '20 at 7:51
  • 1
    @UlrikeFischer That’s also the method for installing legacy fonts, but I should’ve emphasized that. You’re right. – Davislor Dec 4 '20 at 15:04
  • @Davislor As two or three methods are mentioned, could I ask for the approach that you recommend, and maybe just a two or three-point todo list? I could also wait a week or two for the latest 1.213 font to make it into the distribution pack I suppose. – Edward Dec 4 '20 at 20:09
  • 1
    @Edward Unfortunately, I have TeX Live installed on my Windows box instead of MikTeX and cannot easily test any instructions I give. Are you running the console in Administrator mode? – Davislor Dec 5 '20 at 1:29
  • 1
    @Edward I would recommend creating a local TEXMF root directory. Indexing the user directory is, currently, going to cause problems. – Davislor Dec 5 '20 at 1:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.