InsideDarkWeb.com

How to use non-default Google Font (Damion) in a LaTeX document?

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,

TeX - LaTeX Asked on November 12, 2021

1 Answers

One Answer

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.

Answered by Davislor on November 12, 2021

Add your own answers!

Related Questions

How to typeset this Euro sign from Cochineal font

3  Asked on June 11, 2021 by gamification

   

Font family name for Josefin Sans

2  Asked on June 11, 2021 by fogof-mylife

     

Why can’t I get the letter F to be aligned nicely

1  Asked on June 11, 2021 by botenvouwer

     

Tikz inline plots

0  Asked on June 11, 2021

     

Modular arithmetic on node names in TikZ?

6  Asked on June 11, 2021 by leah-wrenn-berman

 

cannot compile matrix to pdf

0  Asked on June 10, 2021 by josephine-woon

       

Big Brackets not working

1  Asked on June 10, 2021

   

Ask a Question

Get help from others!

© 2021 InsideDarkWeb.com. All rights reserved.