I have a font downloaded, it's a *.ttf file. where should I place it for texlive to use?
1 Answers
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.
- 44,045
LaTeXengine you prefer to use, i.e.,LaTeX/PDFLaTeX/XeLaTeX? etc. – MadyYuvi Oct 13 '20 at 14:10XeLaTeXwill 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