diff options
author | Marius <mariausol@gmail.com> | 2012-01-10 13:33:35 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-01-10 13:33:35 +0200 |
commit | d44c3d2b9ac2a797c610b9b472527119c08bf206 (patch) | |
tree | 09dca91a6255797b040b88c2ea348e162c0842e4 /tex/context/base/font-col.lua | |
parent | 2ee95c7070f4d16d25209332378cb27e599292f7 (diff) | |
download | context-d44c3d2b9ac2a797c610b9b472527119c08bf206.tar.gz |
beta 2012.01.09 10:08
Diffstat (limited to 'tex/context/base/font-col.lua')
-rw-r--r-- | tex/context/base/font-col.lua | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/tex/context/base/font-col.lua b/tex/context/base/font-col.lua index b5437e249..f8add1e4e 100644 --- a/tex/context/base/font-col.lua +++ b/tex/context/base/font-col.lua @@ -90,7 +90,7 @@ end -- todo: provide a lua variant (like with definefont) -function collections.clone_one(name) +function collections.registermain(name) local last = font.current() if trace_collecting then report_fonts("def: registering font %s with name %s",last,name) @@ -98,7 +98,7 @@ function collections.clone_one(name) list[#list+1] = last end -function collections.clone_two(name) +function collections.clonevector(name) statistics.starttiming(fonts) local d = definitions[name] local t = { } @@ -169,27 +169,29 @@ function collections.prepare(name) report_fonts("def: applying collection %s to %s (file: %s)",name,current,filename) end list = { } - context.dostartcloningfonts() -- move this to tex \dostart... + context.pushcatcodes("prt") -- context.unprotect() + context.font_fallbacks_start_cloning() for i=1,#d do local f = d[i] local name = f.font local scale = f.rscale or 1 if lpegmatch(okay,name) then - context.doclonefonta(name,scale) -- define with unique specs + context.font_fallbacks_clone_unique(name,scale) else - context.doclonefontb(name,scale) -- define with inherited specs + context.font_fallbacks_clone_inherited(name,scale) end - context.doclonefontstageone(name) -- registering main font + context.font_fallbacks_register_main(name) end - context.doclonefontstagetwo(name) -- preparing clone vectors - context.dostopcloningfonts() + context.font_fallbacks_prepare_clone_vectors(name) + context.font_fallbacks_stop_cloning() + context.popcatcodes() -- context.protect() elseif trace_collecting then local filename = file.basename(fontdata[current].properties.filename or "?") report_fonts("def: error in applying collection %s to %s (file: %s)",name,current,filename) end end -function collections.message(message) +function collections.report(message) if trace_collecting then report_fonts("tex: %s",message) end @@ -226,9 +228,9 @@ end -- interface -commands.definefontcollection = collections.define -commands.resetfontcollection = collections.reset -commands.preparefontcollection = collections.prepare -commands.fontcollectionmessage = collections.message -commands.clonefontcollection_one = collections.clone_one -commands.clonefontcollection_two = collections.clone_two +commands.fontcollectiondefine = collections.define +commands.fontcollectionreset = collections.reset +commands.fontcollectionprepare = collections.prepare +commands.fontcollectionreport = collections.report +commands.fontcollectionregister = collections.registermain +commands.fontcollectionclone = collections.clonevector |