summaryrefslogtreecommitdiff
path: root/tex/context/base/font-col.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2010-10-20 00:20:12 +0300
committerMarius <mariausol@gmail.com>2010-10-20 00:20:12 +0300
commitf93975efd76053e907d19114d4ba576ae44da134 (patch)
treebde9a37d4fd9dd8eae1ce89d3adb154cfe5d3d5d /tex/context/base/font-col.lua
parent8009e0ec2449002df344f784da9fe6846abc774f (diff)
downloadcontext-f93975efd76053e907d19114d4ba576ae44da134.tar.gz
beta 2010.10.19 23:03
Diffstat (limited to 'tex/context/base/font-col.lua')
-rw-r--r--tex/context/base/font-col.lua18
1 files changed, 8 insertions, 10 deletions
diff --git a/tex/context/base/font-col.lua b/tex/context/base/font-col.lua
index 357567d14..59ba0547c 100644
--- a/tex/context/base/font-col.lua
+++ b/tex/context/base/font-col.lua
@@ -8,18 +8,16 @@ if not modules then modules = { } end modules ['font-col'] = {
-- possible optimization: delayed initialization of vectors
-local format, gmatch, texsprint, type = string.format, string.gmatch, tex.sprint, type
+local gmatch, type = string.gmatch, type
local traverse_id, first_character = node.traverse_id, node.first_character
local lpegmatch = lpeg.match
local settings_to_hash = utilities.parsers.settings_to_hash
-local ctxcatcodes = tex.ctxcatcodes
-
local trace_collecting = false trackers.register("fonts.collecting", function(v) trace_collecting = v end)
local report_fonts = logs.new("fonts")
-local fonts = fonts
+local fonts, context = fonts, context
fonts.collections = fonts.collections or { }
local collections = fonts.collections
@@ -166,20 +164,20 @@ function collections.prepare(name)
report_fonts("def: applying collection %s to %s (file: %s)",name,current,filename)
end
list = { }
- texsprint(ctxcatcodes,"\\dostartcloningfonts") -- move this to tex \dostart...
+ context.dostartcloningfonts() -- move this to tex \dostart...
for i=1,#d do
local f = d[i]
local name = f.font
local scale = f.rscale or 1
if lpegmatch(okay,name) then
- texsprint(ctxcatcodes,format("\\doclonefonta{%s}{%s}",name,scale)) -- define with unique specs
+ context.doclonefonta(name,scale) -- define with unique specs
else
- texsprint(ctxcatcodes,format("\\doclonefontb{%s}{%s}",name,scale)) -- define with inherited specs
+ context.doclonefontb(name,scale) -- define with inherited specs
end
- texsprint(ctxcatcodes,format("\\ctxlua{fonts.collections.stage_1('%s')}",name)) -- registering main font
+ context.doclonefontstageone(name) -- registering main font
end
- texsprint(ctxcatcodes,format("\\ctxlua{fonts.collections.stage_2('%s')}",name)) -- preparing clone vectors
- texsprint(ctxcatcodes,"\\dostopcloningfonts")
+ context.doclonefontstagetwo(name) -- preparing clone vectors
+ context.dostopcloningfonts()
elseif trace_collecting then
local filename = file.basename(fontdata[current].filename or "?")
report_fonts("def: error in applying collection %s to %s (file: %s)",name,current,filename)