From ec22f80a4df73c67f9a4bfb128ee5065261cc452 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 10 May 2013 02:29:22 +0200 Subject: create $TEXMFVAR if missing --- luaotfload-tool.lua | 13 +++++++++++++ luaotfload.dtx | 17 +++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 0d3b229..2c525d9 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -90,6 +90,19 @@ config.lualibs.load_extended = false require"lualibs" +--- prepare directories: the cache function in Luatex-Fonts +--- checks for writable directory only on startup, so everything +--- has to be laid out before we load basics-gen + +local cachepath = kpse.expand_var"$TEXMFVAR" +if not lfs.isdir(cachepath) then + dir.mkdirs(cachepath) + if not lfs.isdir(cachepath) then + texiowrite(stringformat( + "ERROR could not create directory %s", cachepath)) + end +end + --[[doc-- \fileent{luatex-basics-gen.lua} calls functions from the \luafunction{texio.*} library; too much for our taste. diff --git a/luaotfload.dtx b/luaotfload.dtx index daaa48c..0d062a6 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -1289,6 +1289,23 @@ if tex.luatexversion < luatex_version then luatex_version /100) end +% \end{macrocode} +% Prepare directories: the cache function in Luatex-Fonts checks for a +% writable directory only once during startup. If there is no +% \fileent{texmf-var} at this time it will create a subdirectory +% \fileent{./luatex-cache} instead. +% Thus everything has to be laid out before we load the fontloader. +% +% \begin{macrocode} + +local cachepath = kpse.expand_var"$TEXMFVAR" +if not lfs.isdir(cachepath) then + dir.mkdirs(cachepath) + if not lfs.isdir(cachepath) then + error( "ERROR could not create directory %s", cachepath) + end +end + % \end{macrocode} % \subsection{Module loading} % We load the files imported from \CONTEXT with this function. -- cgit v1.2.3 From 631c921ce21e9240ba97b2871b79d990aacdce03 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 10 May 2013 03:50:35 +0200 Subject: lowercase feature values --- luaotfload-features.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luaotfload-features.lua b/luaotfload-features.lua index 5e8216c..82d447c 100644 --- a/luaotfload-features.lua +++ b/luaotfload-features.lua @@ -213,7 +213,7 @@ local toboolean = function (s) if s == "false" then return false end --if s == "yes" then return true end --- Context style --if s == "no" then return false end - return s + return stringlower(s) end --- dirty test if a file: request is actually a path: lookup; don’t -- cgit v1.2.3 From 16fbe9db46002faa0b9e54214e42992cc3fdd7ba Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 10 May 2013 11:09:19 +0200 Subject: =?UTF-8?q?don=E2=80=99t=20remove=20requested=20features=20before?= =?UTF-8?q?=20normalization?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- luaotfload-features.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luaotfload-features.lua b/luaotfload-features.lua index 82d447c..8852596 100644 --- a/luaotfload-features.lua +++ b/luaotfload-features.lua @@ -415,7 +415,7 @@ local handle_request = function (specification) local newvalue = request.features[feat] if newvalue then specification[feat] = request.features[feat] - request.features[feat] = nil + --request.features[feat] = nil end end -- cgit v1.2.3