summaryrefslogtreecommitdiff
path: root/luaotfload.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'luaotfload.dtx')
-rw-r--r--luaotfload.dtx43
1 files changed, 37 insertions, 6 deletions
diff --git a/luaotfload.dtx b/luaotfload.dtx
index 70edf8c..b66a88f 100644
--- a/luaotfload.dtx
+++ b/luaotfload.dtx
@@ -400,7 +400,23 @@ and the derived files
% \begin{quote}
% |\font\fontname=|\meta{prefix}|:|\meta{fontname}\dots
% \end{quote}
-% where \meta{prefix} is either \verb|file:| or \verb|name:|.
+% where \meta{prefix} is either \verb|file:| or \verb|name:|.\footnote{%
+% The development version also knows two further prefixes,
+% \verb|kpse:| and \verb|my:|.
+% A \verb|kpse| lookup is restricted to files that can be found by
+% \identifier{kpathsea} and
+% will not attempt to locate system fonts.
+% This behavior can be of value when an extra degree of encapsulation is
+% needed, for instance when supplying a customized tex distribution.
+%
+% The \verb|my| lookup takes this a step further: it lets you define
+% a custom resolver function and hook it into the \luafunction{resolve_font}
+% callback.
+% This ensures full control over how a file is located.
+% For a working example see the
+% \href{https://bitbucket.org/phg/lua-la-tex-tests/src/5f6a535d/pln-lookup-callback-1.tex}
+% {test repo}.
+% }
% It determines whether the font loader should interpret the request as
% a \emphasis{file name} or
% \emphasis{font name}, respectively,
@@ -410,7 +426,26 @@ and the derived files
% “GFS Bodoni Rg”, and
% “PT Serif Caption”
% -- they are the human readable identifiers
-% usually listed in drop-down menus and the like.
+% usually listed in drop-down menus and the like.\footnote{%
+% Font names may appear like a great choice at first because they
+% offer seemingly more intuitive identifiers in comparison to arguably
+% cryptic file names:
+% “PT Sans Bold” is a lot more descriptive than \fileent{PTS75F.ttf}.
+% On the other hand, font names are quite arbitrary and there is no
+% universal method to determine their meaning.
+% While \identifier{luaotfload} provides fairly sophisticated heuristic
+% to figure out a matching font style, weight, and optical size, it
+% cannot be relied upon to work satisfactorily for all font files.
+% For an in-depth analysis of the situation and how broken font names
+% are, please refer to
+% \href{http://www.ntg.nl/pipermail/ntg-context/2013/073889.html}
+% {this post}
+% by Hans Hagen, the author of the font loader.
+% If in doubt, use filenames.
+% \fileent{luaotfload-tool} can perform the matching for you with the
+% option \verb|--find=<name>|, and you can use the file name it returns
+% in your font definition.
+% }
% In order for fonts installed both in system locations and in your
% \fileent{texmf} to be accessible by font name, \identifier{luaotfload} must
% first collect the metadata included in the files.
@@ -1159,9 +1194,6 @@ and the derived files
% \ouritem {luaotfload-features.lua} font feature handling;
% incorporates some of the code from
% \fileent{font-otc} from \CONTEXT;
-% \ouritem {luaotfload-lib-dir.lua} \fileent{l-dir} from \CONTEXT;
-% contains functionality required
-% by \fileent{luaotfload-font-nms.lua}.
% \ouritem {luaotfload-override.lua} overrides the \CONTEXT logging
% functionality.
% \ouritem {luaotfload-loaders.lua} registers the \OpenType
@@ -1770,7 +1802,6 @@ add_to_callback("hpack_filter",
add_to_callback("find_vf_file",
find_vf_file, "luaotfload.find_vf_file")
-loadmodule"lib-dir.lua" --- required by luaofload-database.lua
loadmodule"override.lua" --- “luat-ovr”
logs.set_loglevel(config.luaotfload.loglevel)