diff options
author | Hans Hagen <pragma@wxs.nl> | 2009-11-26 16:28:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2009-11-26 16:28:00 +0100 |
commit | 527274eadad499558bb40b794882661970c5cc67 (patch) | |
tree | fd9ec2fc0bd070a11ce0756eb7b78e5952331dc6 /tex/context/base/font-ctx.lua | |
parent | d59c05050d5ff72bb4c9496b06e42648ed5f982e (diff) | |
download | context-527274eadad499558bb40b794882661970c5cc67.tar.gz |
stable 2009.11.26 16:28
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 |