From 4001733dc25cb6743004db0e9319708481d91135 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sun, 19 Jun 2011 14:17:00 +0200 Subject: beta 2011.06.19 14:17 --- tex/generic/context/luatex-fonts-enc.lua | 2 +- tex/generic/context/luatex-fonts-merged.lua | 23 ++++++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) (limited to 'tex/generic') diff --git a/tex/generic/context/luatex-fonts-enc.lua b/tex/generic/context/luatex-fonts-enc.lua index ac736f2a6..e20c3a03b 100644 --- a/tex/generic/context/luatex-fonts-enc.lua +++ b/tex/generic/context/luatex-fonts-enc.lua @@ -18,7 +18,7 @@ fonts.encodings.agl = { } setmetatable(fonts.encodings.agl, { __index = function(t,k) if k == "unicodes" then texio.write(" ") - local unicodes = dofile(resolvers.findfile("font-agl.lua")) + local unicodes = dofile(resolvers.findfile("font-age.lua")) fonts.encodings.agl = { unicodes = unicodes } return unicodes else diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 54ef6442e..f9234d8fd 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 06/16/11 18:20:55 +-- merge date : 06/19/11 14:17:51 do -- begin closure to overcome local limits and interference @@ -144,7 +144,7 @@ local getinfo = debug.getinfo -- Starting with version 5.2 Lua no longer provide ipairs, which makes -- sense. As we already used the for loop and # in most places the -- impact on ConTeXt was not that large; the remaining ipairs already --- have been replaced. In a similar fashio we also hardly used pairs. +-- have been replaced. In a similar fashion we also hardly used pairs. -- -- Just in case, we provide the fallbacks as discussed in Programming -- in Lua (http://www.lua.org/pil/7.3.html): @@ -1069,6 +1069,23 @@ function table.loweredkeys(t) -- maybe utf return l end +-- new, might move (maybe duplicate) + +function table.unique(old) + local hash = { } + local new = { } + local n = 0 + for i=1,#old do + local oi = old[i] + if not hash[oi] then + n = n + 1 + new[n] = oi + hash[oi] = true + end + end + return new +end + end -- closure do -- begin closure to overcome local limits and interference @@ -4173,7 +4190,7 @@ fonts.encodings.agl = { } setmetatable(fonts.encodings.agl, { __index = function(t,k) if k == "unicodes" then texio.write(" ") - local unicodes = dofile(resolvers.findfile("font-agl.lua")) + local unicodes = dofile(resolvers.findfile("font-age.lua")) fonts.encodings.agl = { unicodes = unicodes } return unicodes else -- cgit v1.2.3