summaryrefslogtreecommitdiff
path: root/tex/generic/context/luatex-fonts-merged.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/generic/context/luatex-fonts-merged.lua')
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua37
1 files changed, 19 insertions, 18 deletions
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index e95f2980a..2a496e9cd 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 : 12/18/10 21:03:48
+-- merge date : 12/21/10 10:50:53
do -- begin closure to overcome local limits and interference
@@ -5646,7 +5646,7 @@ local definers = fonts.definers
otf.glists = { "gsub", "gpos" }
-otf.version = 2.706 -- beware: also sync font-mis.lua
+otf.version = 2.707 -- beware: also sync font-mis.lua
otf.cache = containers.define("fonts", "otf", otf.version, true)
local loadmethod = "table" -- table, mixed, sparse
@@ -6553,23 +6553,27 @@ actions["reorganize subtables"] = function(data,filename,raw)
end
end
+-- the next one is still messy but will get better when we have
+-- flattened map/enc tables in the font loader
+
actions["prepare unicodes"] = function(data,filename,raw)
local luatex = data.luatex
- local indices, unicodes, multiples, internals = { }, { }, { }, { }
- local mapmap = data.map or raw.map
- local mapenc = nil -- will go away
- if not mapmap then
- report_otf("no map in %s",filename)
+ local indices, unicodes, multiples, internals= { }, { }, { }, { }
+ local mapdata = data.map or raw.map -- map already moved
+ local mapmap
+ if not mapdata then
+ report_otf("no mapdata in '%s'",filename)
mapmap = { }
- data.map = { map = mapmap }
- elseif not mapmap.map then
- report_otf("no unicode map in %s",filename)
+ mapdata = { map = mapmap }
+ data.map = mapdata
+ elseif not mapdata.map then
+ report_otf("no map in mapdata of '%s'",filename)
mapmap = { }
- data.map.map = mapmap
+ mapdata.map = mapmap
else
- mapenc = mapmap.enc -- will go away
- mapmap = mapmap.map
+ mapmap = mapdata.map
end
+ local encname = lower(data.enc_name or raw.enc_name or mapdata.enc_name or "")
local criterium = fonts.privateoffset
local private = criterium
local glyphs = data.glyphs
@@ -6615,12 +6619,9 @@ actions["prepare unicodes"] = function(data,filename,raw)
end
end
-- beware: the indices table is used to initialize the tfm table
- local encname = lower(data.enc_name or (mapenc and mapenc[1] and mapenc[1].enc_name) or "") -- mapenc will go away
- -- will become: local encname = lower(data.enc_name or "")
---~ if encname == "" or encname == "unicodebmp" or encname == "unicodefull" then -- maybe find(encname,"unicode")
- if find(encname,"unicode") then
+ if find(encname,"unicode") then -- unicodebmp, unicodefull, ...
if trace_loading then
- report_otf("using extra unicode map")
+ report_otf("using embedded unicode map '%s'",encname)
end
-- ok -- we can also consider using the altuni
for unicode, index in next, mapmap do