In my scenario I am using my own custom font. It is an OpenType font - not a tex-packaged one either, just one I've made in FontCreator (Windows 7).
Now, I want to use this font with lualatex
, so I put a copy of myfont.otf
here
C:\texlive\2013\texmf-dist\fonts\truetype\public
and it gets picked up.
My problem:
If I update myfont.otf
and replace the copy in that folder with a new one, it doesn't get used because lualatex
is using the one in its cache, as is reflected in this log entry:
luaotfload | load: auto-selecting default features for script: dflt(load luc: C:/texlive/2013/texmf-var/luatex-cache/generic/fonts/otf/myfont.luc)
Now, so far the only way I have found to get my font used (after I've replaced it) is to:
- Delete
lualatex
's cache directories atC:\texlive\2013\texmf-var\luatex-cache\
,%USERPROFILE%\.texlive2013\texmf-var
andC:\texlive\texmf-var\lualatex-cache
- Then run
texhash
- Then run
updmap
When I compile the next tex file, it rebuilds the cache using the new font:
luaotfload | resolve: font family='priory', subfamily='regular' found: c:/texliv
e/2013/texmf-dist/fonts/truetype/public/myfont.otf(save: C:/texlive/2013/texmf-v
ar/luatex-cache/generic/fonts/otf/myfont.lua)(save: C:/texlive/2013/texmf-var/lu
atex-cache/generic/fonts/otf/myfont.luc)
Is there a better way to do this? Can I rebuild the font cache without having to manually delete directories?
luaotfload-tool --cache=erase
orluaotfload-tool --cache=purge
(no idea what is the difference).C:\texlive\2013\texmf-var\luatex-cache\generic\fonts\otf
man 1 luaotfload-tool
; from that man page: “1. purge -> delete Lua files from cache; 2. erase -> delete Lua and Luc files from cache;”.C:\texlive\2013\texmf-dist\fonts\truetype\public
is not a good idea. UseC:\texlive\texmf-local\fonts\truetype\<fontname>
creating the needed directories if not existent;<fontname>
stands for an arbitrary string, saymyfont
if your font ismyfont.ttf
. Of course, if the font is OTF, useopentype
instead oftruetype
.man
. In texlive I can find a pdf-file withtexdoc luaotfload-tool
, in miktex I couldn't find nothing withtexdoc
, and with a file search in the doc folder only aluaotfload-tool.1
.