Indexing fonts

Marcel Fabian Krüger tex at 2krueger.de
Tue Dec 20 15:15:47 CET 2022


On Sun, Dec 18, 2022 at 04:20:33PM -0700, Karl Berry wrote:
> Here is my attempt at rewriting the system font section in the TL manual
> to reflect current reality. If any suggestions or comments, let me know.

Hi Karl,

some comments inline:

> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> \htmlanchor{xetexfontconfig}  % keep historical anchor working
> \htmlanchor{sysfontconfig}
> \subsubsection{System font configuration for \protect\XeTeX\protect\ and Lua\protect\TeX}
> \label{sec:font-conf-sys}
> 
> \XeTeX\ and Lua\TeX\ can use any font installed on the system, not just
> those in the \TeX\ trees. Such system fonts (not part of \TL) are
> usually accessed by giving the font name, e.g., `\code{Liberation
> Serif}', although the system filename can also be used.

The filename remark is true for LuaLaTeX / luaotfload, XeTeX allows
system filenames only if the system font directories are in the kpathsea
search path which normally isn't the case (on Linux at least, I think
it's more common on Windows to add the system fonts there).

> 
> [...]
> 
> For plain Lua\TeX and all \XeTeX\ formats: on Windows, fonts shipped
> with \TL\ are automatically made available (by running the
> \cmdname{fc-cache} program provided for Windows as part of \TL). On
> \MacOSX, supporting font name lookups requires additional steps; please
> see the Mac\TeX\ web pages (\url{https://tug.org/mactex}). For other
> Unix systems, the procedure is the following.

For \XeTeX this sounds accurate. For plain Lua\TeX\ it's a bit more
complicated. Without additional packages plain LuaTeX doesn't support
system fonts (or any OpenType fonts for that matter) at all, so it
depends on which code is loaded to get the font support. If it's
luaotfload (which I think is the most common) then the same behavior
as for LuaLaTeX applies: System fonts just work. If the ConTeXt
fontloader is included directly then I'm not sure about the details
but IIRC you should get similar behavior: Caches should get updated
automatically when needed. If some other code for font support is
used then it depends on that code...

But it's almost certain that in no case fontconfig matters under LuaTeX
since LuaTeX doesn't link against fontconfig, so this would either
require to call the fontconfig shell utilities or to load a fontconfig
library dynamically, but of which don't work except when running with
shell-escape.

Best,
Marcel


More information about the tex-live mailing list.