summaryrefslogtreecommitdiff
path: root/tex/context/base/font-gds.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-10-01 19:00:00 +0200
committerHans Hagen <pragma@wxs.nl>2013-10-01 19:00:00 +0200
commitc54e16cd36f55642657ebe388715b6fd890d13ec (patch)
treed67661ff79193fb8555c1cbc8d533bc91e65fd85 /tex/context/base/font-gds.lua
parent56f25d8a5368c042d5c8ab92205007cb9d5c21b3 (diff)
downloadcontext-c54e16cd36f55642657ebe388715b6fd890d13ec.tar.gz
beta 2013.10.01 19:00
Diffstat (limited to 'tex/context/base/font-gds.lua')
-rw-r--r--tex/context/base/font-gds.lua38
1 files changed, 38 insertions, 0 deletions
diff --git a/tex/context/base/font-gds.lua b/tex/context/base/font-gds.lua
index 1b2ac0009..284714261 100644
--- a/tex/context/base/font-gds.lua
+++ b/tex/context/base/font-gds.lua
@@ -832,3 +832,41 @@ registerotffeature {
node = finalize,
}
}
+
+-- kern hackery
+
+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
+ end
+ end
+ tfmdata.properties.keptligatures = hash
+ end
+ end
+ end
+ end
+end
+
+registerotffeature {
+ name = "keptligatures",
+ description = "kept ligatures in letterspacing",
+ default = true,
+ initializers = {
+ base = setkeptligatures,
+ node = setkeptligatures,
+ }
+}