diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-22 22:14:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-22 22:14:39 +0000 |
commit | fc4466b32ed330a956ac603b00fd145524cff49a (patch) | |
tree | 2c50e2b8de13aa9233b2c76dffe201558f169e86 /Master/texmf-dist/tex/context/base/mkiv/m-oldotf.mkiv | |
parent | 50e2368597d5f6fe2057195d0ae6a9f2044923e4 (diff) |
context (22apr16)
git-svn-id: svn://tug.org/texlive/trunk@40691 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/m-oldotf.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/m-oldotf.mkiv | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/m-oldotf.mkiv b/Master/texmf-dist/tex/context/base/mkiv/m-oldotf.mkiv new file mode 100644 index 00000000000..c7c468d93ec --- /dev/null +++ b/Master/texmf-dist/tex/context/base/mkiv/m-oldotf.mkiv @@ -0,0 +1,77 @@ +%D \module +%D [ file=m-oldotf, +%D version=2015.07.08, +%D title=\CONTEXT\ Extra Modules, +%D subtitle=Traditional OTF Loader, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\unprotect + +\startluacode + local files = { + "font-otf", + "font-otb", + "font-inj", +-- "font-ota", + "font-otn", + "font-otd", + "font-otp", + "font-otc", + "font-oth", + "font-odv", + "font-map", + "font-fbk", + "font-gds", + } + local report = logs.reporter("oldotf") + local findfile = resolvers.findfile + local addsuffix = file.addsuffix + report() + report("using traditional font loader code") + report() + for i=1,#files do + local foundfile = findfile(addsuffix(files[i],"lua")) + if foundfile and foundfile ~= "" then + report("loading %a",foundfile) + dofile(foundfile) + end + end + report() + + -- needed for testing: + + local nuts = nodes.nuts + local copy_node = nuts.copy + local kern = nuts.pool.register(nuts.pool.kern()) + local setfield = nuts.setfield + + nuts.setattr(kern,attributes.private('fontkern'),1) -- we can have several, attributes are shared + + nodes.injections.installnewkern(function(k) + local c = copy_node(kern) + setfield(c,"kern",k) + return c + end) + + directives.register("fonts.injections.fontkern", function(v) setfield(kern,"subtype",v and 0 or 1) end) + + local fonts = fonts + local handlers = fonts.handlers + local otf = handlers.otf -- brrr + local afm = handlers.afm -- brrr + local getters = fonts.getters + + getters.kern .opentype = otf.getkern + getters.substitution.opentype = otf.getsubstitution + getters.alternate .opentype = otf.getalternate + getters.multiple .opentype = otf.getmultiple + +\stopluacode + +\protect \endinput |