I have a font downloaded, it's a *.ttf file. where should I place it for texlive to use?

  • It is based on what LaTeX engine you prefer to use, i.e., LaTeX/PDFLaTeX/XeLaTeX? etc.
    – MadyYuvi
    Oct 13 '20 at 14:10
  • @MadyYuvi I think it's XeLatex Oct 13 '20 at 14:25
  • XeLaTeX will pick the font by auto once you install it into your system, or you can keep in a particular path and map the folder path by using the tag \setmainfont[Path = ...]
    – MadyYuvi
    Oct 13 '20 at 14:56
  • This seems to be the canonical answer, but it’s out of date.
    – Davislor
    Oct 13 '20 at 16:28

You can install it as a system font, and all applications, including LuaTeX and TeX Live, will be able to find it.

On Linux, you can copy a font to (a subdirectory of) /usr/local/share/fonts/ to install for all users, or ~/.fonts/ to install for one user. (There might be other font paths that work on your distribution.) On Windows, installing for all users will work but installing as a single user will not. On MacOS, the System Font Book will work.

You don’t need to read any further if that solves your problem.

If you only want the font in your TeX Live tree, and not every font menu on your system, run

kpsewhich --var-value=TEXMFLOCAL

to find your local TeX Live tree. You can put your fonts in a subdirectory, such as a new directory under fonts/opentype/ of your TEXMFLOCAL tree, and keep all the files from the same package in the same place.

There is a TEXMFHOME as well as TEXMFLOCAL, but I don’t recommend it unless you are unable to install packages to TEXMFLOCAL.

Normally, after installing files to a TeX Live tree, you would run texhash. If you installed any legacy 8-bit fonts and updated the font maps, also run updmap-sys.

If you installed OpenType or TrueType fonts, you might want to update the font caches. You could run

fc-cache -f -s -v
luaotfload-tool -f -u -p -v

But you probably don’t need to. LuaTeX and XeTeX should search for new fonts the first time you request them.

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.