summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/font-col.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-05-08 22:36:52 +0000
committerKarl Berry <karl@freefriends.org>2015-05-08 22:36:52 +0000
commit5dc3418fd91c83782dce77f0b65549e14f118f51 (patch)
tree9b4ec94c1bb0be9831fd3b887de69df098d46211 /Master/texmf-dist/tex/context/base/font-col.lua
parentb810c0301dd20283addb956384210b7926eef35d (diff)
context
git-svn-id: svn://tug.org/texlive/trunk@37284 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/font-col.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/font-col.lua19
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" }
+}