From 1f8c4726d3da14ebb6071bdba5888ebe763329d0 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Wed, 10 Jun 2009 11:22:00 +0200 Subject: beta 2009.06.10 11:22 --- tex/context/base/font-ctx.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (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 e87b21165..2f51c5229 100644 --- a/tex/context/base/font-ctx.lua +++ b/tex/context/base/font-ctx.lua @@ -282,17 +282,20 @@ local specification -- local get_specification = define.get_specification +-- we can make helper macros which saves parsing (but normaly not +-- that many calls, e.g. in mk a couple of 100 and in metafun 3500) + function define.command_1(str) statistics.starttiming(fonts) local fullname, size = splitpattern:match(str) local lookup, name, sub, method, detail = get_specification(fullname) if not name then logs.report("define font","strange definition '%s'",str) - texsprint(ctxcatcodes,"\\glet\\somefontname\\defaultfontfile") + texsprint(ctxcatcodes,"\\fcglet\\somefontname\\defaultfontfile") elseif name == "unknown" then - texsprint(ctxcatcodes,"\\glet\\somefontname\\defaultfontfile") + texsprint(ctxcatcodes,"\\fcglet\\somefontname\\defaultfontfile") else - texsprint(ctxcatcodes,format("\\xdef\\somefontname{%s}",name)) + texsprint(ctxcatcodes,format("\\fcxdef\\somefontname{%s}",name)) end -- we can also use a count for the size if size and size ~= "" then @@ -316,6 +319,8 @@ function define.command_1(str) specification = define.makespecification(str,lookup,name,sub,method,detail,size) end +local n = 0 + function define.command_2(global,cs,str,size,classfeatures,fontfeatures,classfallbacks,fontfallbacks,mathsize,textsize) -- name is now resolved and size is scaled cf sa/mo local lookup, name, sub, method, detail = get_specification(str or "") -- cgit v1.2.3