summaryrefslogtreecommitdiff
path: root/luaotfload.dtx
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-05-09 13:27:37 -0700
committerPhilipp Gesang <phg42.2a@gmail.com>2013-05-09 13:27:37 -0700
commitf0d437bc1bdf18f5eb7e296df7b3784cb04dabc2 (patch)
treeccd6c6247f4d4c6117b3e0800b8bfd769de798be /luaotfload.dtx
parentae8ffd0615b797d91cd8799debf12e2891c5b0d2 (diff)
parent7647a39d3d704888b105dfb000970b7bd60d7682 (diff)
downloadluaotfload-f0d437bc1bdf18f5eb7e296df7b3784cb04dabc2.tar.gz
Merge pull request #53 from phi-gamma/master
pdf.js bug and font scaling
Diffstat (limited to 'luaotfload.dtx')
-rw-r--r--luaotfload.dtx44
1 files changed, 24 insertions, 20 deletions
diff --git a/luaotfload.dtx b/luaotfload.dtx
index 6c88e37..daaa48c 100644
--- a/luaotfload.dtx
+++ b/luaotfload.dtx
@@ -947,6 +947,11 @@ and the derived files
%
% \verb|luaotfload-tool --help| will list the available command line
% switches, including some not discussed in detail here.
+% For a full documentation of \identifier{luaotfload-tool} and its
+% capabilities refer to the manpage
+% (\verb|man 1 luaotfload-tool|).\footnote{%
+% Or see \verb|luaotfload-tool.rst| in the source directory.
+% }
%
% \subsection{Blacklisting Fonts}
% \label{font-blacklist}
@@ -1219,11 +1224,12 @@ local luaotfload = luaotfload
config = config or { }
config.luaotfload = config.luaotfload or { }
-------.luaotfload.resolver = config.luaotfload.resolver or "normal"
-config.luaotfload.resolver = config.luaotfload.resolver or "cached"
-config.luaotfload.definer = config.luaotfload.definer or "patch"
+------.luaotfload.resolver = config.luaotfload.resolver or "normal"
+config.luaotfload.resolver = config.luaotfload.resolver or "cached"
+config.luaotfload.definer = config.luaotfload.definer or "patch"
+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.color_callback = config.luaotfload.color_callback or "pre_linebreak_filter"
--luaotfload.prefer_merge = config.luaotfload.prefer_merge or true
luaotfload.module = {
@@ -1254,17 +1260,6 @@ local reset_callback, call_callback =
local dummy_function = function () end
-% \end{macrocode}
-% No final decision has been made on how to handle font definition. At
-% the moment, there are three candidates: The \identifier{generic}
-% callback as hard-coded in the font loader, the \identifier{old}
-% wrapper, and a simplified version of the latter (\identifier{patch})
-% that does nothing besides applying font patches.
-%
-% \begin{macrocode}
-
-luaotfload.font_definer = "patch" --- | “generic” | “old”
-
local error, warning, info, log =
luatexbase.provides_module(luaotfload.module)
@@ -1606,13 +1601,22 @@ formats.ofm = "type1"
% most cases when looking up font files, only when generating the database.
%
% \begin{macrocode}
-request_resolvers.file = function (specification)
- local found = fonts.names.crude_file_lookup(specification.name)
- --local found = fonts.names.crude_file_lookup_verbose(specification.name)
- specification.name = found[1]
- --if format then specification.forced = format end
+
+local resolvefile = fonts.names.crude_file_lookup
+--local resolvefile = fonts.names.crude_file_lookup_verbose
+
+function request_resolvers.file(specification)
+ local name=resolvefile(specification.name)
+ local suffix=file.suffix(name)
+ if formats[suffix] then
+ specification.forced=suffix
+ specification.name=file.removesuffix(name)
+ else
+ specification.name=name
+ end
end
+
% \end{macrocode}
% We classify as \verb|anon:| those requests that have neither a
% prefix nor brackets. According to Khaled\footnote{%