summaryrefslogtreecommitdiff
path: root/luaotfload.dtx
diff options
context:
space:
mode:
authorElie Roux <elie.roux@telecom-bretagne.eu>2013-04-25 00:44:16 -0700
committerElie Roux <elie.roux@telecom-bretagne.eu>2013-04-25 00:44:16 -0700
commit3d1c11400648c123b372e0cfce089175707a38f6 (patch)
tree718245422b1b727d5b939e5a3a8b0191424521d4 /luaotfload.dtx
parent63ee07f1f4021d07c5d89b706f2a9f1d8a4d97c9 (diff)
parent743c725a3c4e515cdb591a04dc5396c5e9e1de42 (diff)
downloadluaotfload-3d1c11400648c123b372e0cfce089175707a38f6.tar.gz
Merge pull request #5 from phi-gamma/master
changes to font request and database code
Diffstat (limited to 'luaotfload.dtx')
-rw-r--r--luaotfload.dtx75
1 files changed, 48 insertions, 27 deletions
diff --git a/luaotfload.dtx b/luaotfload.dtx
index dbc822f..18e01d8 100644
--- a/luaotfload.dtx
+++ b/luaotfload.dtx
@@ -870,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}
@@ -907,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]
@@ -936,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}:
@@ -1038,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.",
@@ -1107,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
@@ -1265,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')
@@ -1318,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.
@@ -1339,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}
@@ -1389,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
@@ -1415,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
@@ -1486,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