diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/font-col.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/font-col.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/font-col.lua b/Master/texmf-dist/tex/context/base/font-col.lua index 997c57c9f92..cbc1953f45f 100644 --- a/Master/texmf-dist/tex/context/base/font-col.lua +++ b/Master/texmf-dist/tex/context/base/font-col.lua @@ -40,6 +40,7 @@ local vectors = collections.vectors or { } collections.vectors = vectors local fontdata = fonts.hashes.identifiers +local chardata = fonts.hashes.characters local glyph_code = nodes.nodecodes.glyph local currentfont = font.current @@ -275,6 +276,18 @@ function collections.process(head) -- this way we keep feature processing return head, done end +function collections.found(font,char) -- this way we keep feature processing + if not char then + font, char = currentfont(), font + end + if chardata[font][char] then + return true -- in normal font + else + local v = vectors[font] + return v and v[char] and true or false + end +end + -- interface implement { @@ -312,3 +325,9 @@ implement { actions = collections.clonevector, arguments = "string" } + +implement { + name = "doifelsecharinfont", + actions = { collections.found, commands.doifelse }, + arguments = { "integer" } +} |