From 527274eadad499558bb40b794882661970c5cc67 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Thu, 26 Nov 2009 16:28:00 +0100 Subject: stable 2009.11.26 16:28 --- tex/context/base/font-ctx.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tex/context/base/font-ctx.lua') 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 -- cgit v1.2.3