User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
working_with_fonts [2015/03/14 03:38]
bgm [How to Add Fonts for Use with LuaLaTex (Windows)]
working_with_fonts [2015/03/14 03:38] (current)
bgm [Updating an Existing Font]
Line 1: Line 1:
 +===== How to Know Where to Put Your Font File (Windows) =====
 +At the commandline,​ run this:
 +<​code>​kpsewhich --var=TEXMFLOCAL</​code>​
 +It will give you a directory, such as <​html>​C:​\texlive\texmf-local</​html>​.
 +On that path you will find <​html>​\fonts\truetype\public</​html>​
 +This is where you put your fonts (you can use subfolders if you want to).
 +===== How to Add Fonts for Use with LuaLaTex (Windows) =====
 +  - Locate your lualatex fonts folder (for example, <​html>​C:​\texlive\texmf-local\fonts\truetype\public</​html>​
 +  - Place your font there (you can use a subfolder if you like)
 +  - Now you have to tell lualatex that they are available. Open your commandline and run this command: <​code=lua>​
 +  texhash</​code>​
 +  - Don't forget that in your <​html>​tex</​html>​ file, you have to use <​html>​\usepackage{fontspec}</​html>​
 +  - And, to actually call the font, do this within the <​html>​\begin{document}</​html>​ section: <​code=lua>​\newfontface\MyFont{MyFont}
 +%or, to use it in just one place
 +\begin{center}\MyFont\huge{The Score Title}\end{center}
 +===== Updating an Existing Font =====
 +To update a font, you do the same thing you would if you want to add a font, except that you *first* have to erase lulatex'​s font cache, so you would do this:
 +<​code=lua>​luaotfload-tool --cache=erase
 +Running the <​html>​luaotfload-tool --cache=erase</​html>​ command will erase the cache located at <​html>​C:​\texlive\2013\texmf-var\luatex-cache\</​html>​. ​ But don't worry, the next time you compile a tex file, lualatex will rebuid the cache automatically.
 +===== Links ======
 +  * [[http://​​questions/​232921/​updating-your-own-font/​232931#​232931|Updating Your Own Font]]
 +  * [[http://​​questions/​25249/​how-do-i-use-a-particular-font-for-a-small-section-of-text-in-my-document|How to use a particular font in a particular place]]
 +Back to [[Start]] Page
working_with_fonts.txt ยท Last modified: 2015/03/14 03:38 by bgm