summaryrefslogtreecommitdiff
path: root/luaotfload.dtx
diff options
context:
space:
mode:
authorElie Roux <elie.roux@telecom-bretagne.eu>2013-04-27 03:08:43 -0700
committerElie Roux <elie.roux@telecom-bretagne.eu>2013-04-27 03:08:43 -0700
commit7a7a17242c20dfd54dfce2e5ead889f62c66d61f (patch)
tree942ffddaa830a52504831526512ce48ddb5ab83d /luaotfload.dtx
parentf3776cb0941e417f8aa2efe46773cc7330506387 (diff)
parente6b0062da9c8315605e9c8a10202337416ea5cd5 (diff)
downloadluaotfload-7a7a17242c20dfd54dfce2e5ead889f62c66d61f.tar.gz
Merge pull request #11 from lualatex/master
update with lualatex master
Diffstat (limited to 'luaotfload.dtx')
-rw-r--r--luaotfload.dtx89
1 files changed, 62 insertions, 27 deletions
diff --git a/luaotfload.dtx b/luaotfload.dtx
index 7c74a37..18e01d8 100644
--- a/luaotfload.dtx
+++ b/luaotfload.dtx
@@ -158,6 +158,8 @@ and the derived files
\newcommand*\email[1]{\href{mailto:#1}{#1}}
+\renewcommand\partname{Part}%% gets rid of the stupid “file” heading
+
\VerbatimFootnotes
\begin{document}
\DocInput{luaotfload.dtx}%
@@ -868,6 +870,7 @@ and the derived files
% \incitem{font-otf.lua} \incitem{font-otb.lua}
% \incitem{node-inj.lua} \incitem{font-ota.lua}
% \incitem{font-otn.lua} \incitem{font-def.lua}
+% \incitem{font-otp.lua}
% \end{itemize}
% \end{multicols}
% \end{itemize}
@@ -882,6 +885,18 @@ and the derived files
% \CONTEXT beta, all you have to do is remove
% \fileent{luaotfload-merged.lua} from the search path.
%
+% Also, the merged file at some point
+% loads the Adobe Glyph List from a \LUA table that is contained in
+% \fileent{font-age.lua}, which is automatically generated by the
+% script \fileent{mkglyphlist}.\footnote{%
+% See \fileent{luaotfload-font-enc.lua}.
+% The hard-coded file name is why the file lacks the \fileent{luaotfload-}
+% prefix.
+% }
+% There is a make target \identifier{glyphs} that will create a fresh
+% \fileent{font-age.lua} so we don’t need to import it from \CONTEXT
+% any longer.
+%
% In addition to these, \identifier{luaotfload} requires a number of
% files not contained in the merge. Some of these have no equivalent in
% \LUATEX-Fonts or \CONTEXT, some were taken unmodified from the
@@ -893,21 +908,20 @@ and the derived files
% \normalitem{\fileent{#1}}%
% \space--\hskip1em
% }
-% \ouritem {luaotfload-font-otc.lua} \fileent{font-otc} from \CONTEXT;
-% font feature handling.
-% \ouritem {luaotfload-lib-dir.lua} \fileent{l-dir} from \CONTEXT;
-% contains functionality required
-% by \fileent{luaotfload-font-nms.lua}.
-% \ouritem {luaotfload-luat-ovr.lua} overrides the \CONTEXT logging
-% functionality.
-% \ouritem {luaotfload-font-pfb.lua} registers the \OpenType
-% font reader as handler for
-% Postscript fonts.
-% \ouritem {luaotfload-font-nms.lua} font database.
-% \ouritem {luaotfload-font-clr.lua} color handling.
-% \ouritem {luaotfload-font-ltx.lua} font feature handling.
-% \ouritem {luaotfload-features.lua} definitions of the \verb|anum| and
-% \verb|tlig| features.
+% \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
+% font reader as handler for
+% Postscript fonts
+% (\abbrev{pfa}, \abbrev{pfb}).
+% \ouritem {luaotfload-database.lua} font names database.
+% \ouritem {luaotfload-colors.lua} color handling.
% \end{itemize}
%
% \begin{figure}[b]
@@ -922,6 +936,10 @@ and the derived files
% version of this package before reporting a bug, as
% \identifier{luaotfload} is under active development and still a
% moving target.
+% The development takes place on \identifier{github} at
+% \url{https://github.com/lualatex/luaotfload} where there is an issue
+% tracker for submitting bug reports, feature requests and the likes
+% requests and the likes.
%
% Errors during database generation can be traced by increasing
% verbosity levels and redirecting log output to \fileent{stdout}:
@@ -1024,13 +1042,19 @@ local error, warning, info, log =
luatexbase.provides_module(luaotfload.module)
% \end{macrocode}
-%
-% We set the minimum version requirement for \LUATEX to v0.74, as it was
-% the first version to include version 5.2 of the \LUA interpreter.
+% We set the minimum version requirement for \LUATEX to v0.76,
+% because the font loader requires recent features like direct
+% attribute indexing and \luafunction{node.end_of_math()} that aren’t
+% available in earlier versions.\footnote{%
+% See Taco’s announcement of v0.76:
+% \url{http://comments.gmane.org/gmane.comp.tex.luatex.user/4042}
+% and this commit by Hans that introduced those features.
+% \url{http://repo.or.cz/w/context.git/commitdiff/a51f6cf6ee087046a2ae5927ed4edff0a1acec1b}.
+% }
%
% \begin{macrocode}
-local luatex_version = 74
+local luatex_version = 76
if tex.luatexversion < luatex_version then
warning("LuaTeX v%.2f is old, v%.2f is recommended.",
@@ -1093,7 +1117,6 @@ end
% \fileent{luaotfload-merged.lua}.
% If this file cannot be found, the original libraries from \CONTEXT of
% which the merged code was composed are loaded instead.
-%
% The imported font loader will call \luafunction{callback.register} once
% while reading \fileent{font-def.lua}.
% This is unavoidable unless we modify the imported files, but harmless
@@ -1251,6 +1274,7 @@ else--- the loading sequence is known to change, so this might have to
loadmodule('node-inj.lua')
loadmodule('font-ota.lua')
loadmodule('font-otn.lua')
+ loadmodule('font-otp.lua')--- since 2013-04-23
loadmodule('luatex-fonts-lua.lua')
loadmodule('font-def.lua')
loadmodule('luatex-fonts-def.lua')
@@ -1304,6 +1328,8 @@ add_to_callback("find_vf_file",
loadmodule"lib-dir.lua" --- required by luaofload-database.lua
loadmodule"override.lua" --- “luat-ovr”
+logs.set_loglevel(0)
+
% \end{macrocode}
% \CONTEXT does not support ofm, these lines were added in order to make it
% work. However they do not seem necessary so they are commented for now.
@@ -1325,9 +1351,17 @@ loadmodule"colors.lua" --- “font-clr”
% \end{macrocode}
% This hack makes fonts called with file method found by fonts.names.resolve
-% instead of just trying to find them with kpse. It is necessary in case
-% of fonts that are not accessible by kpse but present in the database, a
-% quite common case under Linux.
+% instead of just trying to find them with \identifier{kpse}.
+% It is necessary in cases when font files are not reachable by
+% \identifier{kpse} but present in the database, a quite common case
+% under Linux.
+%
+% As of 2013-04-24 we have a workaround in the resolver that handles
+% \verb|file:| lookups diverted this way.
+% It requires some overhead due to additional extra data saved in the
+% names database, and might vanish entirely once the font request syntax
+% is understood.
+% Until then it is considered a kludge, like the hack below.
%
% \begin{macrocode}
@@ -1375,7 +1409,7 @@ local define_font_wrapper = function (...)
--- definers.read
if stringfind(k, "Percent") then
-- keep percent values as is
- print(k,v)
+ --print(k,v)
mathconstants[k] = v
else
mathconstants[k] = v / units_per_em * size
@@ -1401,8 +1435,10 @@ end
% \begin{macrocode}
local read_font_file = fonts.definers.read
-local patch_defined_font = function (...)
- local tfmdata = read_font_file(...)-- spec -> size -> id -> tmfdata
+
+--- spec -> size -> id -> tmfdata
+local patch_defined_font = function (specification, size, id)
+ local tfmdata = read_font_file(specification, size, id)
if type(tfmdata) == "table" then
call_callback("luaotfload.patch_font", tfmdata)
end
@@ -1472,7 +1508,6 @@ loadmodule"features.lua" --- contains what was “font-ltx” and “font-otc”
-- vim:tw=71:sw=4:ts=4:expandtab
-
% \end{macrocode}
%
% \iffalse