Changes

Jump to navigation Jump to search
662 bytes added ,  23:22, 31 May 2009
= Getting access to the system fonts =
 
LuaTeX can use non-TeX fonts (in OpenType, TrueType or Type1 format) directly.
 
The first time that you run
 
context myfile.tex
 
on a file that uses such non-traditional fonts (which is probably always), the actual fonts themselves have to be loaded in luatex's embedded section of fontforge to extract their metric information. This removes the need for tfm and vf files on your disk, but it is also a somewhat lengthy and often memory-hungry process.
 
That is why the results of that internal preprocessing are also saved inside the texmf cache. Future runs using the same font (not just this file, but all files using that particular font) can then use the cached version of the metrics instead.
== Building the font database ==
You can make LuaTeX access the non-TeX fonts (Type 1, True Type and OpenType) on your system by building a font database. First, you need to specify where the fonts should be looked for, by setting the <code>OSFONTDIR</code> environment variable. For instance,
set OSFONTDIR=c:/windows/fonts/
if the fonts should be found in <code>c:/windows/fonts/</code>; or
if the fonts should be found in both <code>/usr/local/share/fonts</code> and <code>$HOME/.fonts</code>.
The font database will then be automatically generated in the next run of <code>context</code> You can then also generate the font database it manually by typing
mtxrun --script font --reload
or equally

Navigation menu