0

Is there any way of using a Google font that is not provided in LaTeX by default? More specifically, I would like to use the Damion font for a special word in my LaTeX document:

https://fonts.google.com/specimen/Damion#standard-styles

I have downloaded the .ttf file for the font, and I am wondering how I can use it for my LaTeX document.

Thank you for your help in advance,

1
  • you used the tag fontspec so you are using lualatex or xelatex? Jul 21 '20 at 18:11
2

If you copy the font to the appropriate directory, you should be able to load it with \setmainfont or \newfontfamily. The preferred way to load it is by its filename, but you can also load it by family name.

On Windows, you need to install it for all users, not just for your user account, or LuaTeX/XeTeX will not be able to find it. On Mac, I believe you need to install it as a System font as well. The Linux version, however, does search user directories such as ~/.fonts/.

You can also save it under the fonts/truetype/ subdirectory of your local TeX tree. With TeX Live, you can look this up with kpsewhich -var-value=TEXMFLOCAL. (Or TEXMFHOME if you aren’t the sysadmin.) With MikTeX, you would create a new directory yourself and set the TEXINPUTS environment variable.

Finally, if you only need it for one project, you can put it in the project folder. You can also put your fonts in a subdirectory and tell fontspec where to find them with the Path= key. This should be a relative, not absolute, path if you want your document to compile on any other computer, including your next one.

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.