diff options
author | Karl Berry <karl@freefriends.org> | 2017-04-19 23:04:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-04-19 23:04:15 +0000 |
commit | f74161ca4e7eb3c5af9afcbe92522ae3b58987c1 (patch) | |
tree | 3c30a13df5ac7968195c85070a2b074578e669d2 /Master/texmf-dist/tex/context/base/mkiv/font-lig.lua | |
parent | 1d5a55ac8f5506a7ae9cfca52f4b588182e199d4 (diff) |
context beta/cont-tmf.zip (Apr 16 12:55)
git-svn-id: svn://tug.org/texlive/trunk@43931 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/font-lig.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/font-lig.lua | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/font-lig.lua b/Master/texmf-dist/tex/context/base/mkiv/font-lig.lua new file mode 100644 index 00000000000..bb9ee009618 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/font-lig.lua @@ -0,0 +1,48 @@ +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", +} + +-- This module is not loaded but generated a file for plain TeX as a substitute +-- for collapsing the input: "luatex-fonts-lig.lua" with "collapse=yes". + +local standalone = not characters + +if standalone then + require("char-utf") +end + +local data = { } + +for first, seconds in next, characters.graphemes do + for second, combined in next, seconds do + data[combined] = { first, second } + end +end + +-- data['c'] = { 'a', 'b' } +-- data['d'] = { 'c', 'c' } + +local feature = { + name = "collapse", + type = "ligature", + prepend = true, + dataset = { + { data = data }, + { data = data }, + } +} + +if standalone then + local filename = "luatex-fonts-lig.lua" + local filedata = "-- this file is generated by context\n\n" + .. "fonts.handlers.otf.addfeature " + .. table.serialize(feature,false) + logs.report("fonts","pseudo ligature file %a saved",filename) + io.savedata(filename,filedata) +else + fonts.handlers.otf.addfeature(feature) +end |