diff options
author | Hans Hagen <pragma@wxs.nl> | 2013-10-01 19:00:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2013-10-01 19:00:00 +0200 |
commit | c54e16cd36f55642657ebe388715b6fd890d13ec (patch) | |
tree | d67661ff79193fb8555c1cbc8d533bc91e65fd85 /tex/context/base/font-gds.lua | |
parent | 56f25d8a5368c042d5c8ab92205007cb9d5c21b3 (diff) | |
download | context-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.lua | 38 |
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, + } +} |