diff options
author | Hans Hagen <pragma@wxs.nl> | 2023-02-06 19:14:14 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2023-02-06 19:14:14 +0100 |
commit | 0d0874ba797ee44f9fa53ed0fe95d7a863bf2f1b (patch) | |
tree | ea9c82877dd7a14db92e964277551370ecc156cb /tex/context/base/mkxl/font-lig.lmt | |
parent | 83667a906d7cac842635bc5243db70f55b346562 (diff) | |
download | context-0d0874ba797ee44f9fa53ed0fe95d7a863bf2f1b.tar.gz |
2023-02-06 17:57:00
Diffstat (limited to 'tex/context/base/mkxl/font-lig.lmt')
-rw-r--r-- | tex/context/base/mkxl/font-lig.lmt | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tex/context/base/mkxl/font-lig.lmt b/tex/context/base/mkxl/font-lig.lmt new file mode 100644 index 000000000..9a68b4697 --- /dev/null +++ b/tex/context/base/mkxl/font-lig.lmt @@ -0,0 +1,41 @@ +if not modules then modules = { } end modules ['font-lig'] = { + version = 1.001, + comment = "companion to font-ini.mkiv", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files", +} + +-- We keep this for compatibility reasons and demonstration purposes. We delay +-- definition of the data table in order to save some memory. + +-- data['c'] = { 'a', 'b' } +-- data['d'] = { 'c', 'c' } + +local next = next +local setmetatableindex = table.setmetatableindex + +local data = { } + +setmetatableindex(data,function(t,k) + for first, seconds in next, characters.graphemes do + for second, combined in next, seconds do + data[combined] = { first, second } + end + end + setmetatableindex(data) + return t[k] +end) + +local feature = { + name = "collapse", + type = "ligature", + prepend = true, + dataset = { + { data = data }, -- twice ? + { data = data }, + } +} + +-----.handlers.afm.addfeature(feature) +fonts.handlers.otf.addfeature(feature) |