summaryrefslogtreecommitdiff
path: root/tex/context/base/font-gds.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-10-04 23:41:00 +0200
committerHans Hagen <pragma@wxs.nl>2013-10-04 23:41:00 +0200
commitf6436316c9db2940a8d897f7979bfab25e771ae8 (patch)
treedbfdbff3a1aa51522a75ac8417d241ce69ab6392 /tex/context/base/font-gds.lua
parentbf97b73a1cb3cde1c12619fc7de0fc7efbacadcc (diff)
downloadcontext-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.lua52
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,
}
}