diff options
Diffstat (limited to 'tex/context/base/font-ctx.lua')
-rw-r--r-- | tex/context/base/font-ctx.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua index 3845ae5b9..2f63b3a8d 100644 --- a/tex/context/base/font-ctx.lua +++ b/tex/context/base/font-ctx.lua @@ -9,7 +9,7 @@ if not modules then modules = { } end modules ['font-ctx'] = { -- needs a cleanup: merge of replace, lang/script etc local texsprint, count = tex.sprint, tex.count -local format, concat, gmatch, match, find, lower = string.format, table.concat, string.gmatch, string.match, string.find, string.lower +local format, concat, gmatch, match, find, lower, gsub = string.format, table.concat, string.gmatch, string.match, string.find, string.lower, string.gsub local tostring, next, type = tostring, next, type local ctxcatcodes = tex.ctxcatcodes @@ -412,3 +412,7 @@ function fonts.dimenfactor(unit,tfmdata) return dimenfactors[unit] or unit end end + +function fonts.cleanname(name) -- mapped onto macro, see fonts.names.cleanname + texsprint(ctxcatcodes,(gsub(lower(name),"[^%a%d]",""))) +end |