summaryrefslogtreecommitdiff
path: root/tex/context/base/font-ctx.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2009-06-10 11:22:00 +0200
committerHans Hagen <pragma@wxs.nl>2009-06-10 11:22:00 +0200
commit1f8c4726d3da14ebb6071bdba5888ebe763329d0 (patch)
treea25a7aea1d7c9561afbab306db7971eae12dc71b /tex/context/base/font-ctx.lua
parent5b6956e57c33bd35c0ac1e4118cdb1b183d77499 (diff)
downloadcontext-1f8c4726d3da14ebb6071bdba5888ebe763329d0.tar.gz
beta 2009.06.10 11:22
Diffstat (limited to 'tex/context/base/font-ctx.lua')
-rw-r--r--tex/context/base/font-ctx.lua11
1 files changed, 8 insertions, 3 deletions
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 "")