diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-03-10 15:42:39 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-03-10 15:42:39 +0100 |
commit | 0b0256403b7e111df0ecdb8ca589f20df787dacd (patch) | |
tree | 49b02d80ccbb26aa235351ae3dfd2d099635ea72 /tex/context/base/mkiv/cldf-bas.lua | |
parent | 631a40d69d7fb4e5beff90039d21da5472dd1020 (diff) | |
download | context-0b0256403b7e111df0ecdb8ca589f20df787dacd.tar.gz |
2020-03-10 14:47:00
Diffstat (limited to 'tex/context/base/mkiv/cldf-bas.lua')
-rw-r--r-- | tex/context/base/mkiv/cldf-bas.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/cldf-bas.lua b/tex/context/base/mkiv/cldf-bas.lua index 9e789a72f..ac17a9381 100644 --- a/tex/context/base/mkiv/cldf-bas.lua +++ b/tex/context/base/mkiv/cldf-bas.lua @@ -34,6 +34,8 @@ local ctxcore = context.core local variables = interfaces.variables local ctx_flushnode = context.nuts.flush +local ctx_sprint = context.sprint +local txtcatcodes = tex.txtcatcodes local nuts = nodes.nuts local tonode = nuts.tonode @@ -47,6 +49,8 @@ local setattrlist = nuts.setattrlist local texgetcount = tex.getcount local texsetcount = tex.setcount +local is_letter = characters.is_letter + -- a set of basic fast ones function context.setfontid(n) @@ -72,6 +76,14 @@ function context.char(k) -- used as escape too, so don't change to utf end end +function context.safechar(c) + if characters.is_letter[c] then -- not yet loaded + ctx_sprint(c) + else + ctx_sprint(txtcatcodes,c) + end +end + function context.utfchar(k) if type(k) == "string" then k = tonumber(k) |