summaryrefslogtreecommitdiff
path: root/tex/generic
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-12-20 02:00:23 +0200
committerMarius <mariausol@gmail.com>2013-12-20 02:00:23 +0200
commit30053a0de6c0d5d25445ca1c9d843ccb1e6f970b (patch)
treeef7c204fc23e449392843fd94afbbb2cdeaa19b3 /tex/generic
parent89a0bbb20443996183d52972334dcd865b70a59d (diff)
downloadcontext-30053a0de6c0d5d25445ca1c9d843ccb1e6f970b.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