diff options
author | Hans Hagen <pragma@wxs.nl> | 2009-12-29 22:32:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2009-12-29 22:32:00 +0100 |
commit | 5eb872dbc6bbc35e222d5b23fc783fb0e75d4a99 (patch) | |
tree | 91164a948df7bcf12b5423db3ef1b310ca2b5017 /tex/context/base/font-ctx.lua | |
parent | 326b0613f1ed21f5711a8d94403512171c058e48 (diff) | |
download | context-5eb872dbc6bbc35e222d5b23fc783fb0e75d4a99.tar.gz |
beta 2009.12.29 22:32
Diffstat (limited to 'tex/context/base/font-ctx.lua')
-rw-r--r-- | tex/context/base/font-ctx.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua index 2f63b3a8d..1233f075d 100644 --- a/tex/context/base/font-ctx.lua +++ b/tex/context/base/font-ctx.lua @@ -11,6 +11,7 @@ if not modules then modules = { } end modules ['font-ctx'] = { local texsprint, count = tex.sprint, tex.count 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 lpegmatch = lpeg.match local ctxcatcodes = tex.ctxcatcodes @@ -48,7 +49,7 @@ name*context specification function specify.predefined(specification) local detail = specification.detail if detail ~= "" then - -- detail = detail:gsub("["..define.splitsymbols.."].*$","") -- get rid of *whatever specs and such + -- detail = gsub(detail,"["..define.splitsymbols.."].*$","") -- get rid of *whatever specs and such if define.methods[detail] then -- since these may be appended at the specification.features.vtf = { preset = detail } -- tex end by default end @@ -295,7 +296,7 @@ local get_specification = define.get_specification function define.command_1(str) statistics.starttiming(fonts) - local fullname, size = splitpattern:match(str) + local fullname, size = lpegmatch(splitpattern,str) local lookup, name, sub, method, detail = get_specification(fullname) if not name then logs.report("define font","strange definition '%s'",str) @@ -307,7 +308,7 @@ function define.command_1(str) end -- we can also use a count for the size if size and size ~= "" then - local mode, size = sizepattern:match(size) + local mode, size = lpegmatch(sizepattern,size) if size and mode then count.scaledfontmode = mode texsprint(ctxcatcodes,"\\def\\somefontsize{",size,"}") |