summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore8
-rw-r--r--NEWS2
-rw-r--r--filegraph.dot4
-rw-r--r--luaotfload-database.lua2
-rw-r--r--luaotfload-fontloader.lua (renamed from luaotfload-merged.lua)50
-rw-r--r--luaotfload.dtx10
-rwxr-xr-xmkstatus2
7 files changed, 65 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
index 4160efd..f231acf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,13 @@ luaotfload.fdb_latexmk
luaotfload.log
luaotfload.out
luaotfload.toc
+luaotfload-characters.lua
+luaotfload-glyphlist.lua
+luaotfload-status.lua
+filegraph.pdf
+glyphlist.txt
+luaotfload-tool.1
+luaotfload/*
# Files generated by 'make world' and removed by 'make mrproper'
luaotfload.lua
@@ -33,3 +40,4 @@ tests/*.ovp
tests/*.ovf
tests/*.sty
tests/luaotfload*
+
diff --git a/NEWS b/NEWS
index 399ed97..64f18e5 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,8 @@ Change History
* Test runner (script mktests)
* New luaotfload-tool option: ``--no-reload``
* ``luaotfload-tool --find`` now understands request syntax
+ * rename ``luaotfload-merged.lua`` (the fontloader package from Context)
+ to ``luaotfload-fontloader.lua``
2013/07/10, luaotfload v2.3a
* Detect LuaJIT interpreter (LuaJITTeX)
diff --git a/filegraph.dot b/filegraph.dot
index 92506e5..f70ef87 100644
--- a/filegraph.dot
+++ b/filegraph.dot
@@ -30,7 +30,7 @@ strict digraph luaotfload_files { //looks weird with circo ...
fontdbutil -> font_names [label="--update",
style=dashed]
- luaotfload -> otfl_fonts_merged [label="merged"]
+ luaotfload -> otfl_fonts_merged [label="merged"]
luaotfload -> merged_lua_libs [label="unmerged", style=solid]
luaotfload -> merged_luatex_fonts [label="unmerged", style=solid]
luaotfload -> merged_context_libs [label="unmerged", style=solid]
@@ -139,7 +139,7 @@ strict digraph luaotfload_files { //looks weird with circo ...
* style = "filled,rounded",
* penwidth=2]
*/
- otfl_fonts_merged [label = "luaotfload-merged.lua",
+ otfl_fonts_merged [label = "luaotfload-fontloader.lua",
shape = rect,
width = "3.2cm",
height = "1.2cm",
diff --git a/luaotfload-database.lua b/luaotfload-database.lua
index 1b20a84..34c06d1 100644
--- a/luaotfload-database.lua
+++ b/luaotfload-database.lua
@@ -419,7 +419,7 @@ load_names = function (dry_run)
[[This can take several minutes; please be patient.]])
data = update_names (fontnames_init (get_font_filter ()),
nil, dry_run)
- if not success then
+ if not data then
report ("both", 0, "db", "Database creation unsuccessful.")
end
end
diff --git a/luaotfload-merged.lua b/luaotfload-fontloader.lua
index 41ed20f..3e89856 100644
--- a/luaotfload-merged.lua
+++ b/luaotfload-fontloader.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 11/01/13 12:20:30
+-- merge date : 11/04/13 11:52:02
do -- begin closure to overcome local limits and interference
@@ -2613,6 +2613,31 @@ function number.signed(i)
return "-",-i
end
end
+local zero=P("0")^1/""
+local plus=P("+")/""
+local minus=P("-")
+local separator=S(".")
+local digit=R("09")
+local trailing=zero^1*#S("eE")
+local exponent=(S("eE")*(plus+Cs((minus*zero^0*P(-1))/"")+minus)*zero^0*(P(-1)*Cc("0")+P(1)^1))
+local pattern_a=Cs(minus^0*digit^1*(separator/""*trailing+separator*(trailing+digit)^0)*exponent)
+local pattern_b=Cs((exponent+P(1))^0)
+function number.sparseexponent(f,n)
+ if not n then
+ n=f
+ f="%e"
+ end
+ local tn=type(n)
+ if tn=="string" then
+ local m=tonumber(n)
+ if m then
+ return lpegmatch((f=="%e" or f=="%E") and pattern_a or pattern_b,format(f,m))
+ end
+ elseif tn=="number" then
+ return lpegmatch((f=="%e" or f=="%E") and pattern_a or pattern_b,format(f,n))
+ end
+ return tostring(n)
+end
local preamble=[[
local type = type
local tostring = tostring
@@ -2631,6 +2656,7 @@ local autosingle = string.autosingle
local autodouble = string.autodouble
local sequenced = table.sequenced
local formattednumber = number.formatted
+local sparseexponent = number.sparseexponent
]]
local template=[[
%s
@@ -2703,6 +2729,14 @@ local format_E=function(f)
n=n+1
return format("format('%%%sE',a%s)",f,n)
end
+local format_j=function(f)
+ n=n+1
+ return format("sparseexponent('%%%se',a%s)",f,n)
+end
+local format_J=function(f)
+ n=n+1
+ return format("sparseexponent('%%%sE',a%s)",f,n)
+end
local format_x=function(f)
n=n+1
return format("format('%%%sx',a%s)",f,n)
@@ -2860,6 +2894,10 @@ local format_M=function(f)
end
return format([[formattednumber(a%s,%q,",")]],n,f)
end
+local format_z=function(f)
+ n=n+(tonumber(f) or 1)
+ return "''"
+end
local format_rest=function(s)
return format("%q",s)
end
@@ -2893,12 +2931,13 @@ local builder=Cs { "start",
+V("c")+V("C")+V("S")
+V("Q")
+V("N")
-+V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("b")+V("t")+V("T")+V("l")+V("L")+V("I")+V("h")
-+V("w")
++V("r")+V("h")+V("H")+V("u")+V("U")+V("p")+V("b")+V("t")+V("T")+V("l")+V("L")+V("I")+V("w")
+V("W")
+V("a")
+V("A")
-+V("m")+V("M")
++V("j")+V("J")
++V("m")+V("M")
++V("z")
+V("*")
)+V("*")
)*(P(-1)+Carg(1))
@@ -2934,8 +2973,11 @@ local builder=Cs { "start",
["I"]=(prefix_any*P("I"))/format_I,
["w"]=(prefix_any*P("w"))/format_w,
["W"]=(prefix_any*P("W"))/format_W,
+ ["j"]=(prefix_any*P("j"))/format_j,
+ ["J"]=(prefix_any*P("J"))/format_J,
["m"]=(prefix_tab*P("m"))/format_m,
["M"]=(prefix_tab*P("M"))/format_M,
+ ["z"]=(prefix_any*P("z"))/format_z,
["a"]=(prefix_any*P("a"))/format_a,
["A"]=(prefix_any*P("A"))/format_A,
["*"]=Cs(((1-P("%"))^1+P("%%")/"%%")^1)/format_rest,
diff --git a/luaotfload.dtx b/luaotfload.dtx
index bf75d1b..b0fb17d 100644
--- a/luaotfload.dtx
+++ b/luaotfload.dtx
@@ -1095,7 +1095,7 @@ and the derived files
% See figure \ref{file-graph} on page \pageref{file-graph} for a
% graphical representation of the dependencies.
% From \LUATEX-Fonts, only the file \fileent{luatex-fonts-merged.lua}
-% has been imported as \fileent{luaotfload-merged.lua}.
+% has been imported as \fileent{luaotfload-fontloader.lua}.
% It is generated by \fileent{mtx-package}, a \LUA source code merging
% too developed by Hans Hagen.\footnote{%
% \fileent{mtx-package} is
@@ -1174,7 +1174,7 @@ and the derived files
% \fileent{luatex-fonts.lua} unmodified into \fileent{luaotfload.lua}.
% Thus if you prefer running bleeding edge code from the
% \CONTEXT beta, all you have to do is remove
-% \fileent{luaotfload-merged.lua} from the search path.
+% \fileent{luaotfload-fontloader.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
@@ -1667,7 +1667,7 @@ end
% How this is executed depends on the presence on the \emphasis{merged
% font loader code}.
% In \identifier{luaotfload} this is contained in the file
-% \fileent{luaotfload-merged.lua}.
+% \fileent{luaotfload-fontloader.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
@@ -1781,7 +1781,7 @@ tex.attribute[0] = 0
%
% \begin{macrocode}
-loadmodule"merged.lua"
+loadmodule"fontloader.lua"
---loadmodule"font-odv.lua" --- <= Devanagari support from Context
if fonts then
@@ -1790,7 +1790,7 @@ if fonts then
log [["I am using the merged version of 'luaotfload.lua' here.]]
log [[ If you run into problems or experience unexpected]]
log [[ behaviour, and if you have ConTeXt installed you can try]]
- log [[ to delete the file 'luaotfload-merged.lua' as I might]]
+ log [[ to delete the file 'luaotfload-fontloader.lua' as I might]]
log [[ then use the possibly updated libraries. The merged]]
log [[ version is not supported as it is a frozen instance.]]
log [[ Problems can be reported to the ConTeXt mailing list."]]
diff --git a/mkstatus b/mkstatus
index 16d0b5d..a8d9233 100755
--- a/mkstatus
+++ b/mkstatus
@@ -52,7 +52,7 @@ local names = {
"luaotfload-letterspace.lua",
"luaotfload-loaders.lua",
"luaotfload.lua",
- "luaotfload-merged.lua",
+ "luaotfload-fontloader.lua",
"luaotfload-override.lua",
"luaotfload-tool.lua",
"luaotfload-typo-krn.lua",