summaryrefslogtreecommitdiff
path: root/tex/generic
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-12-20 00:55:00 +0100
committerHans Hagen <pragma@wxs.nl>2013-12-20 00:55:00 +0100
commit8db34260a2815e53ba955abc578703b8b97b6bd4 (patch)
tree0c6252193ff1c77a3112a64bd28b72a01cb24428 /tex/generic
parent25ec075c2eb5bd0b5dece77e35164a0077ef96ab (diff)
downloadcontext-8db34260a2815e53ba955abc578703b8b97b6bd4.tar.gz
beta 2013.12.20 00:55
Diffstat (limited to 'tex/generic')
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua23
1 files changed, 20 insertions, 3 deletions
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 321bb7700..688cfecb5 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 12/19/13 00:11:25
+-- merge date : 12/20/13 00:55:14
do -- begin closure to overcome local limits and interference
@@ -6435,8 +6435,25 @@ registerdirective("fonts.otf.loader.pack",function(v) packdata=v end)
registerdirective("fonts.otf.loader.syncspace",function(v) syncspace=v end)
registerdirective("fonts.otf.loader.forcenotdef",function(v) forcenotdef=v end)
registerdirective("fonts.otf.loader.overloadkerns",function(v) overloadkerns=v end)
+function otf.fileformat(filename)
+ local leader=lower(io.loadchunk(filename,4))
+ local suffix=lower(file.suffix(filename))
+ if leader=="otto" then
+ return "opentype","otf",suffix=="otf"
+ elseif leader=="ttcf" then
+ return "truetype","ttc",suffix=="ttc"
+ elseif suffix=="ttc" then
+ return "truetype","ttc",true
+ else
+ return "truetype","ttf",suffix=="ttf"
+ end
+end
local function otf_format(filename)
- return formats[lower(file.suffix(filename))]
+ local format,suffix,okay=otf.fileformat(filename)
+ if not okay then
+ report_otf("font %a is actually an %a file",filename,format)
+ end
+ return suffix
end
local function load_featurefile(raw,featurefile)
if featurefile and featurefile~="" then
@@ -8831,7 +8848,7 @@ nodes.injections=nodes.injections or {}
local injections=nodes.injections
local nodecodes=nodes.nodecodes
local glyph_code=nodecodes.glyph
-local kern_disc=nodecodes.disc
+local disc_code=nodecodes.disc
local kern_code=nodecodes.kern
local nuts=nodes.nuts
local nodepool=nuts.pool