diff options
author | Hans Hagen <pragma@wxs.nl> | 2013-10-04 23:41:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2013-10-04 23:41:00 +0200 |
commit | f6436316c9db2940a8d897f7979bfab25e771ae8 (patch) | |
tree | dbfdbff3a1aa51522a75ac8417d241ce69ab6392 /tex/context/base/font-gds.lua | |
parent | bf97b73a1cb3cde1c12619fc7de0fc7efbacadcc (diff) | |
download | context-f6436316c9db2940a8d897f7979bfab25e771ae8.tar.gz |
beta 2013.10.04 23:41
Diffstat (limited to 'tex/context/base/font-gds.lua')
-rw-r--r-- | tex/context/base/font-gds.lua | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/tex/context/base/font-gds.lua b/tex/context/base/font-gds.lua index 284714261..7f8bb91d1 100644 --- a/tex/context/base/font-gds.lua +++ b/tex/context/base/font-gds.lua @@ -833,28 +833,33 @@ registerotffeature { } } --- kern hackery +-- kern hackery: +-- +-- yes : use goodies table +-- auto : assume features to be set (often ccmp only) -local function setkeptligatures(tfmdata,scheme) - local goodies = tfmdata.goodies - if goodies then - for i=1,#goodies do - local g = goodies[i] - local letterspacing = g.letterspacing - if letterspacing then - local keptligatures = letterspacing.keptligatures - if keptligatures then - local unicodes = tfmdata.resources.unicodes - local hash = { } - for k, v in next, keptligatures do - local u = unicodes[k] - if u then - hash[u] = true - else - -- error: unknown name +local function setkeepligatures(tfmdata,value) + if not tfmdata.properties.keptligatures then + local goodies = tfmdata.goodies + if goodies then + for i=1,#goodies do + local g = goodies[i] + local letterspacing = g.letterspacing + if letterspacing then + local keptligatures = letterspacing.keptligatures + if keptligatures then + local unicodes = tfmdata.resources.unicodes + local hash = { } + for k, v in next, keptligatures do + local u = unicodes[k] + if u then + hash[u] = true + else + -- error: unknown name + end end + tfmdata.properties.keptligatures = hash end - tfmdata.properties.keptligatures = hash end end end @@ -862,11 +867,10 @@ local function setkeptligatures(tfmdata,scheme) end registerotffeature { - name = "keptligatures", - description = "kept ligatures in letterspacing", - default = true, + name = "keepligatures", + description = "keep ligatures in letterspacing", initializers = { - base = setkeptligatures, - node = setkeptligatures, + base = setkeepligatures, + node = setkeepligatures, } } |