summaryrefslogtreecommitdiff
path: root/luaotfload.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'luaotfload.dtx')
-rw-r--r--luaotfload.dtx59
1 files changed, 46 insertions, 13 deletions
diff --git a/luaotfload.dtx b/luaotfload.dtx
index 70edf8c..b8bee75 100644
--- a/luaotfload.dtx
+++ b/luaotfload.dtx
@@ -40,7 +40,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: luaotfload v2.2 OpenType layout system}
+\Msg{* Package: luaotfload v2.3 OpenType layout system}
\Msg{************************************************************************}
\keepsilent
@@ -111,7 +111,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{luaotfload.drv}%
- [2013/05/23 v2.2d OpenType layout system]%
+ [2013/05/23 v2.3d OpenType layout system]%
\documentclass{ltxdoc}
\usepackage{metalogo,multicol,mdwlist,fancyvrb,xspace}
\usepackage[x11names]{xcolor}
@@ -231,7 +231,7 @@ and the derived files
% \GetFileInfo{luaotfload.drv}
%
% \title{The \identifier{luaotfload} package}
-% \date{2013/05/23 v2.2d}
+% \date{2013/05/23 v2.3d}
% \author{Elie Roux · Khaled Hosny · Philipp Gesang\\
% Home: \url{https://github.com/lualatex/luaotfload}\\
% Support: \email{lualatex-dev@tug.org}}
@@ -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
@@ -1428,8 +1460,8 @@ and the derived files
%<*lua>
% \fi
% \begin{macrocode}
-luaotfload = luaotfload or {}
-local luaotfload = luaotfload
+luaotfload = luaotfload or {}
+local luaotfload = luaotfload
config = config or { }
config.luaotfload = config.luaotfload or { }
@@ -1440,7 +1472,9 @@ config.luaotfload.compatibility = config.luaotfload.compatibility or false
config.luaotfload.loglevel = config.luaotfload.loglevel or 1
config.luaotfload.color_callback = config.luaotfload.color_callback or "pre_linebreak_filter"
config.luaotfload.prioritize = config.luaotfload.prioritize or "sys"
---luaotfload.prefer_merge = config.luaotfload.prefer_merge or true
+config.luaotfload.names_dir = config.luaotfload.names_dir or "names"
+config.luaotfload.cache_dir = config.luaotfload.cache_dir or "fonts"
+config.luaotfload.names_file = config.luaotfload.names_file or "luaotfload-names.lua"
luaotfload.module = {
name = "luaotfload",
@@ -1770,7 +1804,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)
@@ -2036,7 +2069,7 @@ loadmodule"auxiliary.lua" --- additionaly high-level functionality (new)
\else
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{luaotfload}%
- [2013/05/23 v2.2d OpenType layout system]
+ [2013/05/23 v2.3d OpenType layout system]
\RequirePackage{luatexbase}
\fi
\ifnum\luatexversion<76