From 03766f7aaa5a741c5d52a1ee8201a887e594b350 Mon Sep 17 00:00:00 2001
From: Marius This module implements some methods and creates additional datastructured
diff --git a/tex/context/base/chem-ini.lua b/tex/context/base/chem-ini.lua
index 4bbfe4c38..4d47982a2 100644
--- a/tex/context/base/chem-ini.lua
+++ b/tex/context/base/chem-ini.lua
@@ -13,7 +13,7 @@ local P, R, V, Cc, Cs = lpeg.P, lpeg.R, lpeg.V, lpeg.Cc, lpeg.Cs
local trace_molecules = false trackers.register("chemistry.molecules", function(v) trace_molecules = v end)
-local report_chemistry = logs.new("chemistry")
+local report_chemistry = logs.reporter("chemistry")
local context = context
diff --git a/tex/context/base/chem-str.lua b/tex/context/base/chem-str.lua
index 0e5f36434..44849c067 100644
--- a/tex/context/base/chem-str.lua
+++ b/tex/context/base/chem-str.lua
@@ -13,7 +13,7 @@ if not modules then modules = { } end modules ['chem-str'] = {
local trace_structure = false trackers.register("chemistry.structure", function(v) trace_structure = v end)
local trace_textstack = false trackers.register("chemistry.textstack", function(v) trace_textstack = v end)
-local report_chemistry = logs.new("chemistry")
+local report_chemistry = logs.reporter("chemistry")
local format, gmatch, match, lower, gsub = string.format, string.gmatch, string.match, string.lower, string.gsub
local concat, insert, remove = table.concat, table.insert, table.remove
diff --git a/tex/context/base/cldf-ini.lua b/tex/context/base/cldf-ini.lua
index 5d84bc9fa..b7f9ee44b 100644
--- a/tex/context/base/cldf-ini.lua
+++ b/tex/context/base/cldf-ini.lua
@@ -50,8 +50,8 @@ local xmlcatcodes = tex.xmlcatcodes
local flush = texsprint
-local report_context = logs.new("cld","tex")
-local report_cld = logs.new("cld","stack")
+local report_context = logs.reporter("cld","tex")
+local report_cld = logs.reporter("cld","stack")
local processlines = true -- experiments.register("context.processlines", function(v) processlines = v end)
diff --git a/tex/context/base/colo-icc.lua b/tex/context/base/colo-icc.lua
index 4687bfe3f..2ce34e8cd 100644
--- a/tex/context/base/colo-icc.lua
+++ b/tex/context/base/colo-icc.lua
@@ -11,7 +11,7 @@ local readstring, readnumber = io.readstring, io.readnumber
local colors = attributes and attributes.colors or { } -- when used in mtxrun
-local report_colors = logs.new("colors","icc")
+local report_colors = logs.reporter("colors","icc")
local R, Cs, lpegmatch = lpeg.R, lpeg.Cs, lpeg.match
diff --git a/tex/context/base/colo-ini.lua b/tex/context/base/colo-ini.lua
index eed68d4c6..75cee7b23 100644
--- a/tex/context/base/colo-ini.lua
+++ b/tex/context/base/colo-ini.lua
@@ -14,7 +14,7 @@ local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
local trace_define = false trackers.register("colors.define",function(v) trace_define = v end)
-local report_colors = logs.new("colors","defining")
+local report_colors = logs.reporter("colors","defining")
local attributes, context, commands = attributes, context, commands
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 66505ff4e..296163ad7 100644
--- a/tex/context/base/cont-new.mkii
+++ b/tex/context/base/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2011.02.08 18:41}
+\newcontextversion{2011.02.08 21:46}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 4ad3f18d3..927f1fd94 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2011.02.08 18:41}
+\newcontextversion{2011.02.08 21:46}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index 07832d91e..f422ce0d1 100644
--- a/tex/context/base/context.mkii
+++ b/tex/context/base/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2011.02.08 18:41}
+\edef\contextversion{2011.02.08 21:46}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 86588ab88..566aa9020 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2011.02.08 18:41}
+\edef\contextversion{2011.02.08 21:46}
%D For those who want to use this:
diff --git a/tex/context/base/core-ctx.lua b/tex/context/base/core-ctx.lua
index b6ea7e66b..1ee8e9698 100644
--- a/tex/context/base/core-ctx.lua
+++ b/tex/context/base/core-ctx.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['core-ctx'] = {
local trace_prepfiles = false trackers.register("system.prepfiles", function(v) trace_prepfiles = v end)
-local report_prepfiles = logs.new("system","prepfiles")
+local report_prepfiles = logs.reporter("system","prepfiles")
commands = commands or { }
local commands = commands
diff --git a/tex/context/base/core-job.lua b/tex/context/base/core-job.lua
index 56e71f8ae..f56d2ca1f 100644
--- a/tex/context/base/core-job.lua
+++ b/tex/context/base/core-job.lua
@@ -19,7 +19,7 @@ resolvers.maxreadlevel = 3
directives.register("resolvers.maxreadlevel", function(v) resolvers.maxreadlevel = tonumber(v) or resolvers.maxreadlevel end)
-local report_examodes = logs.new("system","examodes") -- maybe another category
+local report_examodes = logs.reporter("system","examodes") -- maybe another category
local function exists(n)
if io.exists(n) then
@@ -130,7 +130,7 @@ function commands.loadexamodes(filename)
end
end
-local report_options = logs.new("system","options")
+local report_options = logs.reporter("system","options")
function commands.logoptionfile(name)
-- todo: xml if xml logmode
diff --git a/tex/context/base/core-uti.lua b/tex/context/base/core-uti.lua
index f302d6051..cae744176 100644
--- a/tex/context/base/core-uti.lua
+++ b/tex/context/base/core-uti.lua
@@ -24,7 +24,7 @@ local serialize = table.serialize
local packers = utilities.packers
local allocate, mark = utilities.storage.allocate, utilities.storage.mark
-local report_jobcontrol = logs.new("jobcontrol")
+local report_jobcontrol = logs.reporter("jobcontrol")
job = job or { }
local job = job
diff --git a/tex/context/base/data-aux.lua b/tex/context/base/data-aux.lua
index 480005a45..058033afe 100644
--- a/tex/context/base/data-aux.lua
+++ b/tex/context/base/data-aux.lua
@@ -13,7 +13,7 @@ local trace_locating = false trackers.register("resolvers.locating", function(v
local resolvers = resolvers
-local report_scripts = logs.new("resolvers","scripts")
+local report_scripts = logs.reporter("resolvers","scripts")
function resolvers.updatescript(oldname,newname) -- oldname -> own.name, not per se a suffix
local scriptpath = "scripts/context/lua"
diff --git a/tex/context/base/data-con.lua b/tex/context/base/data-con.lua
index 673361d74..ed4f2dec0 100644
--- a/tex/context/base/data-con.lua
+++ b/tex/context/base/data-con.lua
@@ -29,7 +29,7 @@ containers = containers or { }
local containers = containers
containers.usecache = true
-local report_containers = logs.new("resolvers","containers")
+local report_containers = logs.reporter("resolvers","containers")
local function report(container,tag,name)
if trace_cache or trace_containers then
diff --git a/tex/context/base/data-ctx.lua b/tex/context/base/data-ctx.lua
index 6b9dc23ab..adf334d8e 100644
--- a/tex/context/base/data-ctx.lua
+++ b/tex/context/base/data-ctx.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['data-ctx'] = {
local format = string.format
-local report_dump = logs.new("resolvers","dump")
+local report_dump = logs.reporter("resolvers","dump")
local resolvers = resolvers
diff --git a/tex/context/base/data-exp.lua b/tex/context/base/data-exp.lua
index 7ddf7e319..e81389682 100644
--- a/tex/context/base/data-exp.lua
+++ b/tex/context/base/data-exp.lua
@@ -18,7 +18,7 @@ local collapsepath = file.collapsepath
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end)
-local report_expansions = logs.new("resolvers","expansions")
+local report_expansions = logs.reporter("resolvers","expansions")
local resolvers = resolvers
diff --git a/tex/context/base/data-fil.lua b/tex/context/base/data-fil.lua
index c9d8b23e1..0e82008f3 100644
--- a/tex/context/base/data-fil.lua
+++ b/tex/context/base/data-fil.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['data-fil'] = {
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_files = logs.new("resolvers","files")
+local report_files = logs.reporter("resolvers","files")
local resolvers = resolvers
diff --git a/tex/context/base/data-ini.lua b/tex/context/base/data-ini.lua
index 5579ea964..7b114e47b 100644
--- a/tex/context/base/data-ini.lua
+++ b/tex/context/base/data-ini.lua
@@ -16,7 +16,7 @@ local trace_locating = false trackers.register("resolvers.locating", functi
local trace_detail = false trackers.register("resolvers.details", function(v) trace_detail = v end)
local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end)
-local report_initialization = logs.new("resolvers","initialization")
+local report_initialization = logs.reporter("resolvers","initialization")
local ostype, osname, ossetenv, osgetenv = os.type, os.name, os.setenv, os.getenv
diff --git a/tex/context/base/data-lst.lua b/tex/context/base/data-lst.lua
index e2ad5164e..3f9425340 100644
--- a/tex/context/base/data-lst.lua
+++ b/tex/context/base/data-lst.lua
@@ -14,7 +14,7 @@ resolvers.listers = resolvers.listers or { }
local resolvers = resolvers
-local report_lists = logs.new("resolvers","lists")
+local report_lists = logs.reporter("resolvers","lists")
local function tabstr(str)
if type(str) == 'table' then
diff --git a/tex/context/base/data-lua.lua b/tex/context/base/data-lua.lua
index ead64fe42..065714407 100644
--- a/tex/context/base/data-lua.lua
+++ b/tex/context/base/data-lua.lua
@@ -12,7 +12,7 @@ if not modules then modules = { } end modules ['data-lua'] = {
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_libraries = logs.new("resolvers","libraries")
+local report_libraries = logs.reporter("resolvers","libraries")
local gsub, insert = string.gsub, table.insert
local unpack = unpack or table.unpack
diff --git a/tex/context/base/data-met.lua b/tex/context/base/data-met.lua
index f9906c854..5437d9a29 100644
--- a/tex/context/base/data-met.lua
+++ b/tex/context/base/data-met.lua
@@ -17,7 +17,7 @@ trackers.register("resolvers.methods", function(v) trace_methods = v end)
--~ trace_methods = true
-local report_methods = logs.new("resolvers","methods")
+local report_methods = logs.reporter("resolvers","methods")
local allocate = utilities.storage.allocate
diff --git a/tex/context/base/data-res.lua b/tex/context/base/data-res.lua
index cd63941da..0683a08b7 100644
--- a/tex/context/base/data-res.lua
+++ b/tex/context/base/data-res.lua
@@ -30,7 +30,7 @@ local trace_locating = false trackers.register("resolvers.locating", functi
local trace_detail = false trackers.register("resolvers.details", function(v) trace_detail = v end)
local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end)
-local report_resolving = logs.new("resolvers","resolving")
+local report_resolving = logs.reporter("resolvers","resolving")
local resolvers = resolvers
diff --git a/tex/context/base/data-sch.lua b/tex/context/base/data-sch.lua
index 7d777319f..1f4a77a79 100644
--- a/tex/context/base/data-sch.lua
+++ b/tex/context/base/data-sch.lua
@@ -13,7 +13,7 @@ local finders, openers, loaders = resolvers.finders, resolvers.openers, resolver
local trace_schemes = false trackers.register("resolvers.schemes",function(v) trace_schemes = v end)
-local report_schemes = logs.new("resolvers","schemes")
+local report_schemes = logs.reporter("resolvers","schemes")
local resolvers = resolvers
diff --git a/tex/context/base/data-tex.lua b/tex/context/base/data-tex.lua
index 38ecaed74..d6c375b52 100644
--- a/tex/context/base/data-tex.lua
+++ b/tex/context/base/data-tex.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['data-tex'] = {
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_tex = logs.new("resolvers","tex")
+local report_tex = logs.reporter("resolvers","tex")
local resolvers = resolvers
diff --git a/tex/context/base/data-tmf.lua b/tex/context/base/data-tmf.lua
index 4c39b57cf..9391e881e 100644
--- a/tex/context/base/data-tmf.lua
+++ b/tex/context/base/data-tmf.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['data-tmf'] = {
local resolvers = resolvers
-local report_tds = logs.new("resolvers","tds")
+local report_tds = logs.reporter("resolvers","tds")
-- = <<
-- ? ??
diff --git a/tex/context/base/data-tmp.lua b/tex/context/base/data-tmp.lua
index 4084eda62..240493195 100644
--- a/tex/context/base/data-tmp.lua
+++ b/tex/context/base/data-tmp.lua
@@ -28,8 +28,8 @@ local mkdirs, isdir = dir.mkdirs, lfs.isdir
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
local trace_cache = false trackers.register("resolvers.cache", function(v) trace_cache = v end)
-local report_caches = logs.new("resolvers","caches")
-local report_resolvers = logs.new("resolvers","caching")
+local report_caches = logs.reporter("resolvers","caches")
+local report_resolvers = logs.reporter("resolvers","caching")
local resolvers = resolvers
diff --git a/tex/context/base/data-tre.lua b/tex/context/base/data-tre.lua
index 3de7bc5b5..88bf4f112 100644
--- a/tex/context/base/data-tre.lua
+++ b/tex/context/base/data-tre.lua
@@ -12,7 +12,7 @@ local find, gsub, format = string.find, string.gsub, string.format
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_trees = logs.new("resolvers","trees")
+local report_trees = logs.reporter("resolvers","trees")
local resolvers = resolvers
diff --git a/tex/context/base/data-use.lua b/tex/context/base/data-use.lua
index 9a31b13c8..d2a9b7571 100644
--- a/tex/context/base/data-use.lua
+++ b/tex/context/base/data-use.lua
@@ -10,7 +10,7 @@ local format, lower, gsub, find = string.format, string.lower, string.gsub, stri
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_mounts = logs.new("resolvers","mounts")
+local report_mounts = logs.reporter("resolvers","mounts")
local resolvers = resolvers
diff --git a/tex/context/base/data-vir.lua b/tex/context/base/data-vir.lua
index 2a7ee1d8b..5a288953f 100644
--- a/tex/context/base/data-vir.lua
+++ b/tex/context/base/data-vir.lua
@@ -9,7 +9,7 @@ if not modules then modules = { } end modules ['data-vir'] = {
local format = string.format
local trace_virtual = false
-local report_virtual = logs.new("resolvers","virtual")
+local report_virtual = logs.reporter("resolvers","virtual")
trackers.register("resolvers.locating", function(v) trace_virtual = v end)
trackers.register("resolvers.virtual", function(v) trace_virtual = v end)
diff --git a/tex/context/base/data-zip.lua b/tex/context/base/data-zip.lua
index 706461aaf..6a50d2aa9 100644
--- a/tex/context/base/data-zip.lua
+++ b/tex/context/base/data-zip.lua
@@ -12,7 +12,7 @@ local format, find, match = string.format, string.find, string.match
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local report_zip = logs.new("resolvers","zip")
+local report_zip = logs.reporter("resolvers","zip")
-- zip:///oeps.zip?name=bla/bla.tex
-- zip:///oeps.zip?tree=tex/texmf-local
diff --git a/tex/context/base/font-afm.lua b/tex/context/base/font-afm.lua
index 31ed1332a..aaf947632 100644
--- a/tex/context/base/font-afm.lua
+++ b/tex/context/base/font-afm.lua
@@ -22,7 +22,7 @@ local trace_indexing = false trackers.register("afm.indexing", function(v) tr
local trace_loading = false trackers.register("afm.loading", function(v) trace_loading = v end)
local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end)
-local report_afm = logs.new("fonts","afm loading")
+local report_afm = logs.reporter("fonts","afm loading")
local next, type = next, type
local format, match, gmatch, lower, gsub, strip = string.format, string.match, string.gmatch, string.lower, string.gsub, string.strip
diff --git a/tex/context/base/font-chk.lua b/tex/context/base/font-chk.lua
index b3a08e50c..d6a0cdcc8 100644
--- a/tex/context/base/font-chk.lua
+++ b/tex/context/base/font-chk.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['font-chk'] = {
-- possible optimization: delayed initialization of vectors
-local report_fonts = logs.new("fonts","checking")
+local report_fonts = logs.reporter("fonts","checking")
local fonts = fonts
diff --git a/tex/context/base/font-cid.lua b/tex/context/base/font-cid.lua
index ed9a25563..a9bd3c56e 100644
--- a/tex/context/base/font-cid.lua
+++ b/tex/context/base/font-cid.lua
@@ -12,7 +12,7 @@ local lpegmatch = lpeg.match
local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end)
-local report_otf = logs.new("fonts","otf loading")
+local report_otf = logs.reporter("fonts","otf loading")
local fonts = fonts
diff --git a/tex/context/base/font-col.lua b/tex/context/base/font-col.lua
index 5b5eaf8ea..e1c2afe48 100644
--- a/tex/context/base/font-col.lua
+++ b/tex/context/base/font-col.lua
@@ -15,7 +15,7 @@ local settings_to_hash = utilities.parsers.settings_to_hash
local trace_collecting = false trackers.register("fonts.collecting", function(v) trace_collecting = v end)
-local report_fonts = logs.new("fonts","collections")
+local report_fonts = logs.reporter("fonts","collections")
local fonts, context = fonts, context
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua
index 22b908825..4a88d3527 100644
--- a/tex/context/base/font-ctx.lua
+++ b/tex/context/base/font-ctx.lua
@@ -22,9 +22,9 @@ local trace_defining = false trackers.register("fonts.defining", function(v) tr
local trace_usage = false trackers.register("fonts.usage", function(v) trace_usage = v end)
local trace_mapfiles = false trackers.register("fonts.mapfiles", function(v) trace_mapfiles = v end)
-local report_defining = logs.new("fonts","defining")
-local report_status = logs.new("fonts","status")
-local report_mapfiles = logs.new("fonts","mapfiles")
+local report_defining = logs.reporter("fonts","defining")
+local report_status = logs.reporter("fonts","status")
+local report_mapfiles = logs.reporter("fonts","mapfiles")
local fonts = fonts
local tfm = fonts.tfm
diff --git a/tex/context/base/font-def.lua b/tex/context/base/font-def.lua
index 09b23f8dc..61132e661 100644
--- a/tex/context/base/font-def.lua
+++ b/tex/context/base/font-def.lua
@@ -19,7 +19,7 @@ local directive_embedall = false directives.register("fonts.embedall", function
trackers.register("fonts.loading", "fonts.defining", "otf.loading", "afm.loading", "tfm.loading")
trackers.register("fonts.all", "fonts.*", "otf.*", "afm.*", "tfm.*")
-local report_defining = logs.new("fonts","defining")
+local report_defining = logs.reporter("fonts","defining")
--[[ldx--
Here we deal with defining fonts. We do so by intercepting the
diff --git a/tex/context/base/font-enc.lua b/tex/context/base/font-enc.lua
index a70d30c10..a18db6730 100644
--- a/tex/context/base/font-enc.lua
+++ b/tex/context/base/font-enc.lua
@@ -29,7 +29,7 @@ enc.known = utilities.storage.allocate { -- sort of obsolete
t2a = true,
t2b = true,
t2c = true,
- unicode = true
+ unicode = true,
}
function enc.is_known(encoding)
diff --git a/tex/context/base/font-enh.lua b/tex/context/base/font-enh.lua
index b745b8f6c..77c145c4b 100644
--- a/tex/context/base/font-enh.lua
+++ b/tex/context/base/font-enh.lua
@@ -12,7 +12,7 @@ local next, match = next, string.match
local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end)
-local report_defining = logs.new("fonts","defining")
+local report_defining = logs.reporter("fonts","defining")
-- tfmdata has also fast access to indices and unicodes
-- to be checked: otf -> tfm -> tfmscaled
diff --git a/tex/context/base/font-ext.lua b/tex/context/base/font-ext.lua
index ff9a70108..eb1e9f447 100644
--- a/tex/context/base/font-ext.lua
+++ b/tex/context/base/font-ext.lua
@@ -17,8 +17,8 @@ local allocate = utilities.storage.allocate
local trace_protrusion = false trackers.register("fonts.protrusion", function(v) trace_protrusion = v end)
local trace_expansion = false trackers.register("fonts.expansion", function(v) trace_expansion = v end)
-local report_expansions = logs.new("fonts","expansions")
-local report_protrusions = logs.new("fonts","protrusions")
+local report_expansions = logs.reporter("fonts","expansions")
+local report_protrusions = logs.reporter("fonts","protrusions")
commands = commands or { }
@@ -217,7 +217,7 @@ initializers.node.afm.expansion = initializers.common.expansion
fonts.goodies.register("expansions", function(...) return fonts.goodies.report("expansions", trace_expansion, ...) end)
-local report_opbd = logs.new("fonts","otf opbd")
+local report_opbd = logs.reporter("fonts","otf opbd")
-- -- -- -- -- --
-- protrusion
diff --git a/tex/context/base/font-fbk.lua b/tex/context/base/font-fbk.lua
index 6092f7442..586af127b 100644
--- a/tex/context/base/font-fbk.lua
+++ b/tex/context/base/font-fbk.lua
@@ -14,7 +14,7 @@ local trace_combining_all = false trackers.register("fonts.combining.all", func
trackers.register("fonts.composing", "fonts.combining")
-local report_combining = logs.new("fonts","combining")
+local report_combining = logs.reporter("fonts","combining")
local allocate = utilities.storage.allocate
diff --git a/tex/context/base/font-gds.lua b/tex/context/base/font-gds.lua
index 048eecd12..f5c5a3127 100644
--- a/tex/context/base/font-gds.lua
+++ b/tex/context/base/font-gds.lua
@@ -11,7 +11,7 @@ local gmatch = string.gmatch
local trace_goodies = false trackers.register("fonts.goodies", function(v) trace_goodies = v end)
-local report_fonts = logs.new("fonts","goodies")
+local report_fonts = logs.reporter("fonts","goodies")
local allocate = utilities.storage.allocate
diff --git a/tex/context/base/font-ini.lua b/tex/context/base/font-ini.lua
index 077be7c0c..3eee559a0 100644
--- a/tex/context/base/font-ini.lua
+++ b/tex/context/base/font-ini.lua
@@ -16,7 +16,7 @@ local write_nl = texio.write_nl
local lower = string.lower
local allocate, mark = utilities.storage.allocate, utilities.storage.mark
-local report_defining = logs.new("fonts","defining")
+local report_defining = logs.reporter("fonts","defining")
fontloader.totable = fontloader.to_table
diff --git a/tex/context/base/font-log.lua b/tex/context/base/font-log.lua
index d7fc16f58..0dbde8e39 100644
--- a/tex/context/base/font-log.lua
+++ b/tex/context/base/font-log.lua
@@ -10,7 +10,7 @@ local next, format, lower, concat = next, string.format, string.lower, table.con
local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end)
-local report_defining = logs.new("fonts","defining")
+local report_defining = logs.reporter("fonts","defining")
local fonts = fonts
fonts.logger = fonts.logger or { }
diff --git a/tex/context/base/font-lua.lua b/tex/context/base/font-lua.lua
index fe07dd38b..a6fcc1642 100644
--- a/tex/context/base/font-lua.lua
+++ b/tex/context/base/font-lua.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['font-lua'] = {
local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end)
-local report_lua = logs.new("fonts","lua loading")
+local report_lua = logs.reporter("fonts","lua loading")
fonts.formats.lua = "lua"
diff --git a/tex/context/base/font-map.lua b/tex/context/base/font-map.lua
index 48ba29a78..cabdbbac6 100644
--- a/tex/context/base/font-map.lua
+++ b/tex/context/base/font-map.lua
@@ -14,7 +14,7 @@ local utfbyte = utf.byte
local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end)
local trace_unimapping = false trackers.register("otf.unimapping", function(v) trace_unimapping = v end)
-local report_otf = logs.new("fonts","otf loading")
+local report_otf = logs.reporter("fonts","otf loading")
--[[ldx--
Eventually this code will disappear because map files are kind
diff --git a/tex/context/base/font-otb.lua b/tex/context/base/font-otb.lua
index 23326607f..8ee39b8c5 100644
--- a/tex/context/base/font-otb.lua
+++ b/tex/context/base/font-otb.lua
@@ -23,7 +23,7 @@ local trace_ligatures = false trackers.register("otf.ligatures", function
local trace_kerns = false trackers.register("otf.kerns", function(v) trace_kerns = v end)
local trace_preparing = false trackers.register("otf.preparing", function(v) trace_preparing = v end)
-local report_prepare = logs.new("fonts","otf prepare")
+local report_prepare = logs.reporter("fonts","otf prepare")
local wildcard = "*"
local default = "dflt"
diff --git a/tex/context/base/font-otc.lua b/tex/context/base/font-otc.lua
index 17e442978..93b942f9a 100644
--- a/tex/context/base/font-otc.lua
+++ b/tex/context/base/font-otc.lua
@@ -16,7 +16,7 @@ local trace_loading = false trackers.register("otf.loading", function(v) trace_
local fonts = fonts
local otf = fonts.otf
-local report_otf = logs.new("fonts","otf loading")
+local report_otf = logs.reporter("fonts","otf loading")
-- instead of "script = "DFLT", langs = { 'dflt' }" we now use wildcards (we used to
-- have always); some day we can write a "force always when true" trick for other
diff --git a/tex/context/base/font-otd.lua b/tex/context/base/font-otd.lua
index 299b703c6..475481643 100644
--- a/tex/context/base/font-otd.lua
+++ b/tex/context/base/font-otd.lua
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['font-otd'] = {
local trace_dynamics = false trackers.register("otf.dynamics", function(v) trace_dynamics = v end)
-local report_otf = logs.new("fonts","otf loading")
+local report_otf = logs.reporter("fonts","otf loading")
local fonts = fonts
local otf = fonts.otf
diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua
index 80046281a..68d3c730c 100644
--- a/tex/context/base/font-otf.lua
+++ b/tex/context/base/font-otf.lua
@@ -32,7 +32,7 @@ local trace_sequences = false trackers.register("otf.sequences", function(v)
local trace_math = false trackers.register("otf.math", function(v) trace_math = v end)
local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end)
-local report_otf = logs.new("fonts","otf loading")
+local report_otf = logs.reporter("fonts","otf loading")
local starttiming, stoptiming, elapsedtime = statistics.starttiming, statistics.stoptiming, statistics.elapsedtime
diff --git a/tex/context/base/font-otn.lua b/tex/context/base/font-otn.lua
index c4abeba22..6c5ba12c8 100644
--- a/tex/context/base/font-otn.lua
+++ b/tex/context/base/font-otn.lua
@@ -148,11 +148,11 @@ local trace_steps = false trackers.register("otf.steps", function
local trace_skips = false trackers.register("otf.skips", function(v) trace_skips = v end)
local trace_directions = false trackers.register("otf.directions", function(v) trace_directions = v end)
-local report_direct = logs.new("fonts","otf direct")
-local report_subchain = logs.new("fonts","otf subchain")
-local report_chain = logs.new("fonts","otf chain")
-local report_process = logs.new("fonts","otf process")
-local report_prepare = logs.new("fonts","otf prepare")
+local report_direct = logs.reporter("fonts","otf direct")
+local report_subchain = logs.reporter("fonts","otf subchain")
+local report_chain = logs.reporter("fonts","otf chain")
+local report_process = logs.reporter("fonts","otf process")
+local report_prepare = logs.reporter("fonts","otf prepare")
trackers.register("otf.verbose_chain", function(v) otf.setcontextchain(v and "verbose") end)
trackers.register("otf.normal_chain", function(v) otf.setcontextchain(v and "normal") end)
diff --git a/tex/context/base/font-otp.lua b/tex/context/base/font-otp.lua
index fe5ced658..221c127f2 100644
--- a/tex/context/base/font-otp.lua
+++ b/tex/context/base/font-otp.lua
@@ -13,7 +13,7 @@ local sort, concat = table.sort, table.concat
local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end)
-local report_otf = logs.new("fonts","otf loading")
+local report_otf = logs.reporter("fonts","otf loading")
fonts = fonts or { } -- this module is also used in mtxrun
local fonts = fonts
diff --git a/tex/context/base/font-syn.lua b/tex/context/base/font-syn.lua
index 5efdab3b4..ee83daaf6 100644
--- a/tex/context/base/font-syn.lua
+++ b/tex/context/base/font-syn.lua
@@ -24,7 +24,7 @@ local trace_names = false trackers.register("fonts.names", fu
local trace_warnings = false trackers.register("fonts.warnings", function(v) trace_warnings = v end)
local trace_specifications = false trackers.register("fonts.specifications", function(v) trace_specifications = v end)
-local report_names = logs.new("fonts","names")
+local report_names = logs.reporter("fonts","names")
--[[ldx--
This module implements a name to filename resolver. Names are resolved
diff --git a/tex/context/base/font-tfm.lua b/tex/context/base/font-tfm.lua
index d7cd0c15e..7fa308c25 100644
--- a/tex/context/base/font-tfm.lua
+++ b/tex/context/base/font-tfm.lua
@@ -16,7 +16,7 @@ local allocate = utilities.storage.allocate
local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end)
local trace_scaling = false trackers.register("fonts.scaling" , function(v) trace_scaling = v end)
-local report_defining = logs.new("fonts","defining")
+local report_defining = logs.reporter("fonts","defining")
-- tfmdata has also fast access to indices and unicodes
-- to be checked: otf -> tfm -> tfmscaled
diff --git a/tex/context/base/grph-fil.lua b/tex/context/base/grph-fil.lua
index 95141d03e..e036cf9a1 100644
--- a/tex/context/base/grph-fil.lua
+++ b/tex/context/base/grph-fil.lua
@@ -10,7 +10,7 @@ local format, concat = string.format, table.concat
local trace_run = false trackers.register("graphic.runfile",function(v) trace_run = v end)
-local report_run = logs.new("graphics","run")
+local report_run = logs.reporter("graphics","run")
local allocate, mark = utilities.storage.allocate, utilities.storage.mark
diff --git a/tex/context/base/grph-inc.lua b/tex/context/base/grph-inc.lua
index 9546218ef..71ef9430a 100644
--- a/tex/context/base/grph-inc.lua
+++ b/tex/context/base/grph-inc.lua
@@ -55,7 +55,7 @@ local trace_programs = false trackers.register("graphics.programs", functio
local trace_conversion = false trackers.register("graphics.conversion", function(v) trace_conversion = v end)
local trace_inclusion = false trackers.register("graphics.inclusion", function(v) trace_inclusion = v end)
-local report_inclusion = logs.new("graphics","inclusion")
+local report_inclusion = logs.reporter("graphics","inclusion")
local context, img = context, img
diff --git a/tex/context/base/grph-u3d.lua b/tex/context/base/grph-u3d.lua
index 25a5addef..09bfd29e7 100644
--- a/tex/context/base/grph-u3d.lua
+++ b/tex/context/base/grph-u3d.lua
@@ -10,7 +10,7 @@ if not modules then modules = { } end modules ['grph-u3d'] = {
local trace_inclusion = false trackers.register("figures.inclusion", function(v) trace_inclusion = v end)
-local report_u3d = logs.new("graphics","u3d")
+local report_u3d = logs.reporter("graphics","u3d")
local figures = figures
diff --git a/tex/context/base/grph-wnd.lua b/tex/context/base/grph-wnd.lua
index 5e048ad46..0ea3f8c43 100644
--- a/tex/context/base/grph-wnd.lua
+++ b/tex/context/base/grph-wnd.lua
@@ -14,7 +14,7 @@ local converters, suffixes = figures.converters, figures.suffixes
local trace_conversion = false trackers.register("figures.conversion", function(v) trace_conversion = v end)
-local report_wand = logs.new("graphics","wand")
+local report_wand = logs.reporter("graphics","wand")
local function togray(oldname,newname)
if lfs.isfile(oldname) then
diff --git a/tex/context/base/java-ini.lua b/tex/context/base/java-ini.lua
index cbe8ab30a..d69b5322c 100644
--- a/tex/context/base/java-ini.lua
+++ b/tex/context/base/java-ini.lua
@@ -17,7 +17,7 @@ local variables = interfaces.variables
local trace_javascript = false trackers.register("backends.javascript", function(v) trace_javascript = v end)
-local report_javascripts = logs.new("interactions","javascripts")
+local report_javascripts = logs.reporter("interactions","javascripts")
interactions.javascripts = interactions.javascripts or { }
local javascripts = interactions.javascripts
@@ -192,7 +192,7 @@ function javascripts.usescripts(name)
context.startnointerference()
context.startreadingfile()
context.input(foundname)
- context.showcolormessage("javascript",1,name)
+ context.showmessage("javascripts",1,name)
context.stopreadingfile()
context.stopnointerference()
end)
diff --git a/tex/context/base/lang-ini.lua b/tex/context/base/lang-ini.lua
index c3bed03a6..0a2d76508 100644
--- a/tex/context/base/lang-ini.lua
+++ b/tex/context/base/lang-ini.lua
@@ -27,7 +27,7 @@ local settings_to_array = utilities.parsers.settings_to_array
local trace_patterns = false trackers.register("languages.patterns", function(v) trace_patterns = v end)
-local report_initialization = logs.new("languages","initialization")
+local report_initialization = logs.reporter("languages","initialization")
local prehyphenchar, posthyphenchar = lang.prehyphenchar, lang.posthyphenchar -- global per language
local lefthyphenmin, righthyphenmin = lang.lefthyphenmin, lang.righthyphenmin
diff --git a/tex/context/base/lang-lab.lua b/tex/context/base/lang-lab.lua
index 41cd40df7..58fff29cd 100644
--- a/tex/context/base/lang-lab.lua
+++ b/tex/context/base/lang-lab.lua
@@ -69,7 +69,7 @@ languages.data = languages.data or { }
local trace_labels = false trackers.register("languages.labels", function(v) trace_labels = v end)
-local report_labels = logs.new("languages","labels")
+local report_labels = logs.reporter("languages","labels")
function languages.labels.define()
local variables = interfaces.variables
diff --git a/tex/context/base/lang-wrd.lua b/tex/context/base/lang-wrd.lua
index b8eb19353..558d5744f 100644
--- a/tex/context/base/lang-wrd.lua
+++ b/tex/context/base/lang-wrd.lua
@@ -12,7 +12,7 @@ local concat = table.concat
local lpegmatch = lpeg.match
local P, S, Cs = lpeg.P, lpeg.S, lpeg.Cs
-local report_words = logs.new("languages","words")
+local report_words = logs.reporter("languages","words")
local nodes, node, languages = nodes, node, languages
diff --git a/tex/context/base/lpdf-ano.lua b/tex/context/base/lpdf-ano.lua
index d020c8a78..60711044e 100644
--- a/tex/context/base/lpdf-ano.lua
+++ b/tex/context/base/lpdf-ano.lua
@@ -16,9 +16,9 @@ local trace_references = false trackers.register("references.references", f
local trace_destinations = false trackers.register("references.destinations", function(v) trace_destinations = v end)
local trace_bookmarks = false trackers.register("references.bookmarks", function(v) trace_bookmarks = v end)
-local report_reference = logs.new("backend","references")
-local report_destination = logs.new("backend","destinations")
-local report_bookmark = logs.new("backend","bookmarks")
+local report_reference = logs.reporter("backend","references")
+local report_destination = logs.reporter("backend","destinations")
+local report_bookmark = logs.reporter("backend","bookmarks")
local variables = interfaces.variables
local constants = interfaces.constants
diff --git a/tex/context/base/lpdf-enc.lua b/tex/context/base/lpdf-enc.lua
new file mode 100644
index 000000000..090fb15cd
--- /dev/null
+++ b/tex/context/base/lpdf-enc.lua
@@ -0,0 +1,157 @@
+if not modules then modules = { } end modules ['lpdf-enc'] = {
+ version = 1.001,
+ comment = "companion to lpdf-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- delayed loading
+
+local pdfconstant = lpdf.constant
+
+return lpdf.dictionary {
+ Type = pdfconstant("Encoding"),
+ Differences = lpdf.array {
+ 24,
+ pdfconstant("breve"),
+ pdfconstant("caron"),
+ pdfconstant("circumflex"),
+ pdfconstant("dotaccent"),
+ pdfconstant("hungarumlaut"),
+ pdfconstant("ogonek"),
+ pdfconstant("ring"),
+ pdfconstant("tilde"),
+ 39,
+ pdfconstant("quotesingle"),
+ 96,
+ pdfconstant("grave"),
+ 128,
+ pdfconstant("bullet"),
+ pdfconstant("dagger"),
+ pdfconstant("daggerdbl"),
+ pdfconstant("ellipsis"),
+ pdfconstant("emdash"),
+ pdfconstant("endash"),
+ pdfconstant("florin"),
+ pdfconstant("fraction"),
+ pdfconstant("guilsinglleft"),
+ pdfconstant("guilsinglright"),
+ pdfconstant("minus"),
+ pdfconstant("perthousand"),
+ pdfconstant("quotedblbase"),
+ pdfconstant("quotedblleft"),
+ pdfconstant("quotedblright"),
+ pdfconstant("quoteleft"),
+ pdfconstant("quoteright"),
+ pdfconstant("quotesinglbase"),
+ pdfconstant("trademark"),
+ pdfconstant("fi"),
+ pdfconstant("fl"),
+ pdfconstant("Lslash"),
+ pdfconstant("OE"),
+ pdfconstant("Scaron"),
+ pdfconstant("Ydieresis"),
+ pdfconstant("Zcaron"),
+ pdfconstant("dotlessi"),
+ pdfconstant("lslash"),
+ pdfconstant("oe"),
+ pdfconstant("scaron"),
+ pdfconstant("zcaron"),
+ 160,
+ pdfconstant("Euro"),
+ 164,
+ pdfconstant("currency"),
+ 166,
+ pdfconstant("brokenbar"),
+ 168,
+ pdfconstant("dieresis"),
+ pdfconstant("copyright"),
+ pdfconstant("ordfeminine"),
+ 172,
+ pdfconstant("logicalnot"),
+ pdfconstant(".notdef"),
+ pdfconstant("registered"),
+ pdfconstant("macron"),
+ pdfconstant("degree"),
+ pdfconstant("plusminus"),
+ pdfconstant("twosuperior"),
+ pdfconstant("threesuperior"),
+ pdfconstant("acute"),
+ pdfconstant("mu"),
+ 183,
+ pdfconstant("periodcentered"),
+ pdfconstant("cedilla"),
+ pdfconstant("onesuperior"),
+ pdfconstant("ordmasculine"),
+ 188,
+ pdfconstant("onequarter"),
+ pdfconstant("onehalf"),
+ pdfconstant("threequarters"),
+ 192,
+ pdfconstant("Agrave"),
+ pdfconstant("Aacute"),
+ pdfconstant("Acircumflex"),
+ pdfconstant("Atilde"),
+ pdfconstant("Adieresis"),
+ pdfconstant("Aring"),
+ pdfconstant("AE"),
+ pdfconstant("Ccedilla"),
+ pdfconstant("Egrave"),
+ pdfconstant("Eacute"),
+ pdfconstant("Ecircumflex"),
+ pdfconstant("Edieresis"),
+ pdfconstant("Igrave"),
+ pdfconstant("Iacute"),
+ pdfconstant("Icircumflex"),
+ pdfconstant("Idieresis"),
+ pdfconstant("Eth"),
+ pdfconstant("Ntilde"),
+ pdfconstant("Ograve"),
+ pdfconstant("Oacute"),
+ pdfconstant("Ocircumflex"),
+ pdfconstant("Otilde"),
+ pdfconstant("Odieresis"),
+ pdfconstant("multiply"),
+ pdfconstant("Oslash"),
+ pdfconstant("Ugrave"),
+ pdfconstant("Uacute"),
+ pdfconstant("Ucircumflex"),
+ pdfconstant("Udieresis"),
+ pdfconstant("Yacute"),
+ pdfconstant("Thorn"),
+ pdfconstant("germandbls"),
+ pdfconstant("agrave"),
+ pdfconstant("aacute"),
+ pdfconstant("acircumflex"),
+ pdfconstant("atilde"),
+ pdfconstant("adieresis"),
+ pdfconstant("aring"),
+ pdfconstant("ae"),
+ pdfconstant("ccedilla"),
+ pdfconstant("egrave"),
+ pdfconstant("eacute"),
+ pdfconstant("ecircumflex"),
+ pdfconstant("edieresis"),
+ pdfconstant("igrave"),
+ pdfconstant("iacute"),
+ pdfconstant("icircumflex"),
+ pdfconstant("idieresis"),
+ pdfconstant("eth"),
+ pdfconstant("ntilde"),
+ pdfconstant("ograve"),
+ pdfconstant("oacute"),
+ pdfconstant("ocircumflex"),
+ pdfconstant("otilde"),
+ pdfconstant("odieresis"),
+ pdfconstant("divide"),
+ pdfconstant("oslash"),
+ pdfconstant("ugrave"),
+ pdfconstant("uacute"),
+ pdfconstant("ucircumflex"),
+ pdfconstant("udieresis"),
+ pdfconstant("yacute"),
+ pdfconstant("thorn"),
+ pdfconstant("ydieresis"),
+ },
+}
diff --git a/tex/context/base/lpdf-epa.lua b/tex/context/base/lpdf-epa.lua
index 14d0da84f..6afdb23d3 100644
--- a/tex/context/base/lpdf-epa.lua
+++ b/tex/context/base/lpdf-epa.lua
@@ -14,7 +14,7 @@ local format = string.format
local trace_links = false trackers.register("figures.links", function(v) trace_links = v end)
-local report_link = logs.new("backend","merging")
+local report_link = logs.reporter("backend","merging")
local backends, lpdf = backends, lpdf
diff --git a/tex/context/base/lpdf-fld.lua b/tex/context/base/lpdf-fld.lua
index 8b2ccaaec..c189b8a67 100644
--- a/tex/context/base/lpdf-fld.lua
+++ b/tex/context/base/lpdf-fld.lua
@@ -16,7 +16,7 @@ local bpfactor, todimen = number.dimenfactors.bp, string.todimen
local trace_fields = false trackers.register("widgets.fields", function(v) trace_fields = v end)
-local report_fields = logs.new("backend","fields")
+local report_fields = logs.reporter("backend","fields")
local backends, lpdf = backends, lpdf
@@ -180,154 +180,11 @@ end
local pdfdocencodingvector, pdfdocencodingcapsule
+-- we could save some bytes by pasing the vector as string
+
local function checkpdfdocencoding()
- -- not using pdfconstant for all these names saves us quite
- -- some bytecode
- local encoding = pdfdictionary {
- Type = pdfconstant("Encoding"),
- Differences = pdfarray {
- 24,
- "/breve",
- "/caron",
- "/circumflex",
- "/dotaccent",
- "/hungarumlaut",
- "/ogonek",
- "/ring",
- "/tilde",
- 39,
- "/quotesingle",
- 96,
- "/grave",
- 128,
- "/bullet",
- "/dagger",
- "/daggerdbl",
- "/ellipsis",
- "/emdash",
- "/endash",
- "/florin",
- "/fraction",
- "/guilsinglleft",
- "/guilsinglright",
- "/minus",
- "/perthousand",
- "/quotedblbase",
- "/quotedblleft",
- "/quotedblright",
- "/quoteleft",
- "/quoteright",
- "/quotesinglbase",
- "/trademark",
- "/fi",
- "/fl",
- "/Lslash",
- "/OE",
- "/Scaron",
- "/Ydieresis",
- "/Zcaron",
- "/dotlessi",
- "/lslash",
- "/oe",
- "/scaron",
- "/zcaron",
- 160,
- "/Euro",
- 164,
- "/currency",
- 166,
- "/brokenbar",
- 168,
- "/dieresis",
- "/copyright",
- "/ordfeminine",
- 172,
- "/logicalnot",
- "/.notdef",
- "/registered",
- "/macron",
- "/degree",
- "/plusminus",
- "/twosuperior",
- "/threesuperior",
- "/acute",
- "/mu",
- 183,
- "/periodcentered",
- "/cedilla",
- "/onesuperior",
- "/ordmasculine",
- 188,
- "/onequarter",
- "/onehalf",
- "/threequarters",
- 192,
- "/Agrave",
- "/Aacute",
- "/Acircumflex",
- "/Atilde",
- "/Adieresis",
- "/Aring",
- "/AE",
- "/Ccedilla",
- "/Egrave",
- "/Eacute",
- "/Ecircumflex",
- "/Edieresis",
- "/Igrave",
- "/Iacute",
- "/Icircumflex",
- "/Idieresis",
- "/Eth",
- "/Ntilde",
- "/Ograve",
- "/Oacute",
- "/Ocircumflex",
- "/Otilde",
- "/Odieresis",
- "/multiply",
- "/Oslash",
- "/Ugrave",
- "/Uacute",
- "/Ucircumflex",
- "/Udieresis",
- "/Yacute",
- "/Thorn",
- "/germandbls",
- "/agrave",
- "/aacute",
- "/acircumflex",
- "/atilde",
- "/adieresis",
- "/aring",
- "/ae",
- "/ccedilla",
- "/egrave",
- "/eacute",
- "/ecircumflex",
- "/edieresis",
- "/igrave",
- "/iacute",
- "/icircumflex",
- "/idieresis",
- "/eth",
- "/ntilde",
- "/ograve",
- "/oacute",
- "/ocircumflex",
- "/otilde",
- "/odieresis",
- "/divide",
- "/oslash",
- "/ugrave",
- "/uacute",
- "/ucircumflex",
- "/udieresis",
- "/yacute",
- "/thorn",
- "/ydieresis",
- },
- }
+ report_fields("adding pdfdoc encoding vector")
+ local encoding = dofile(resolvers.findfile("lpdf-enc.lua")) -- no checking, fatal if not present
pdfdocencodingvector = pdfreference(pdfflushobject(encoding))
local capsule = pdfdictionary {
PDFDocEncoding = pdfdocencodingvector
diff --git a/tex/context/base/lpdf-fmt.lua b/tex/context/base/lpdf-fmt.lua
index 8f0a57bf4..8250ce775 100644
--- a/tex/context/base/lpdf-fmt.lua
+++ b/tex/context/base/lpdf-fmt.lua
@@ -13,7 +13,7 @@ if not modules then modules = { } end modules ['lpdf-fmt'] = {
local trace_format = false trackers.register("backend.format", function(v) trace_format = v end)
local trace_variables = false trackers.register("backend.variables", function(v) trace_variables = v end)
-local report_backend = logs.new("backend","profiles")
+local report_backend = logs.reporter("backend","profiles")
local backends, lpdf = backends, lpdf
diff --git a/tex/context/base/lpdf-ini.lua b/tex/context/base/lpdf-ini.lua
index 044ff5c68..0871ea6f0 100644
--- a/tex/context/base/lpdf-ini.lua
+++ b/tex/context/base/lpdf-ini.lua
@@ -26,8 +26,8 @@ local trace_resources = false trackers.register("backend.resources", function
local trace_objects = false trackers.register("backend.objects", function(v) trace_objects = v end)
local trace_detail = false trackers.register("backend.detail", function(v) trace_detail = v end)
-local report_objects = logs.new("backend","objects")
-local report_finalizing = logs.new("backend","finalizing")
+local report_objects = logs.reporter("backend","objects")
+local report_finalizing = logs.reporter("backend","finalizing")
local backends, context = backends, context
@@ -510,9 +510,6 @@ end
resetpageproperties()
local function setpageproperties()
---~ texset("global", "pdfpageresources", pageresources ())
---~ texset("global", "pdfpageattr", pageattributes ())
---~ texset("global", "pdfpagesattr", pagesattributes())
pdf.pageresources = pageresources ()
pdf.pageattributes = pageattributes ()
pdf.pagesattributes = pagesattributes()
diff --git a/tex/context/base/lpdf-tag.lua b/tex/context/base/lpdf-tag.lua
index e2afddc51..06f3377bc 100644
--- a/tex/context/base/lpdf-tag.lua
+++ b/tex/context/base/lpdf-tag.lua
@@ -12,7 +12,7 @@ local utfchar = utf.char
local trace_tags = false trackers.register("structures.tags", function(v) trace_tags = v end)
-local report_tags = logs.new("backend","tags")
+local report_tags = logs.reporter("backend","tags")
local backends, lpdf, nodes = backends, lpdf, nodes
diff --git a/tex/context/base/lpdf-wid.lua b/tex/context/base/lpdf-wid.lua
index a9e9db2f0..684fa8025 100644
--- a/tex/context/base/lpdf-wid.lua
+++ b/tex/context/base/lpdf-wid.lua
@@ -11,7 +11,7 @@ local texbox, texcount = tex.box, tex.count
local settings_to_array = utilities.parsers.settings_to_array
local settings_to_hash = utilities.parsers.settings_to_hash
-local report_media = logs.new("backend","media")
+local report_media = logs.reporter("backend","media")
local backends, lpdf, nodes = backends, lpdf, nodes
diff --git a/tex/context/base/lpdf-xmp.lua b/tex/context/base/lpdf-xmp.lua
index e216b5e01..160a5ece1 100644
--- a/tex/context/base/lpdf-xmp.lua
+++ b/tex/context/base/lpdf-xmp.lua
@@ -12,7 +12,7 @@ local xmlfillin = xml.fillin
local trace_xmp = false trackers.register("backend.xmp", function(v) trace_xmp = v end)
-local report_xmp = logs.new("backend","xmp")
+local report_xmp = logs.reporter("backend","xmp")
local lpdf = lpdf
diff --git a/tex/context/base/luat-cbk.lua b/tex/context/base/luat-cbk.lua
index ef2a8502f..031a24e0d 100644
--- a/tex/context/base/luat-cbk.lua
+++ b/tex/context/base/luat-cbk.lua
@@ -12,8 +12,8 @@ local round = math.round
local trace_checking = false trackers.register("memory.checking", function(v) trace_checking = v end)
-local report_callbacks = logs.new("system","callbacks")
-local report_memory = logs.new("system","memory")
+local report_callbacks = logs.reporter("system","callbacks")
+local report_memory = logs.reporter("system","memory")
--[[ldx--
Callbacks are the real asset of We've now arrived at an interesting part: accessing the tree using a subset
diff --git a/tex/context/base/lxml-tab.lua b/tex/context/base/lxml-tab.lua
index 422fb14bf..7d38a8d5a 100644
--- a/tex/context/base/lxml-tab.lua
+++ b/tex/context/base/lxml-tab.lua
@@ -12,7 +12,7 @@ if not modules then modules = { } end modules ['lxml-tab'] = {
local trace_entities = false trackers.register("xml.entities", function(v) trace_entities = v end)
-local report_xml = logs and logs.new("xml","core") or function(...) print(format(...)) end
+local report_xml = logs and logs.reporter("xml","core") or function(...) print(format(...)) end
--[[ldx--
The parser used here is inspired by the variant discussed in the lua book, but
diff --git a/tex/context/base/lxml-tex.lua b/tex/context/base/lxml-tex.lua
index a3adaf20a..b4cbbbdd3 100644
--- a/tex/context/base/lxml-tex.lua
+++ b/tex/context/base/lxml-tex.lua
@@ -40,7 +40,7 @@ local trace_loading = false trackers.register("lxml.loading", function(v) tra
local trace_access = false trackers.register("lxml.access", function(v) trace_access = v end)
local trace_comments = false trackers.register("lxml.comments", function(v) trace_comments = v end)
-local report_lxml = logs.new("xml","tex")
+local report_lxml = logs.reporter("xml","tex")
lxml.loaded = lxml.loaded or { }
local loaded = lxml.loaded
diff --git a/tex/context/base/m-database.lua b/tex/context/base/m-database.lua
index 59e875ee4..8dde9690e 100644
--- a/tex/context/base/m-database.lua
+++ b/tex/context/base/m-database.lua
@@ -14,7 +14,7 @@ local sprint, ctxcatcodes = tex.sprint, tex.ctxcatcodes
local trace_flush = false trackers.register("module.database.flush", function(v) trace_flush = v end)
-local report_database = logs.new("database")
+local report_database = logs.reporter("database")
buffers.database = buffers.database or { }
diff --git a/tex/context/base/m-pstricks.lua b/tex/context/base/m-pstricks.lua
index 360c566ee..ab2719084 100644
--- a/tex/context/base/m-pstricks.lua
+++ b/tex/context/base/m-pstricks.lua
@@ -19,7 +19,7 @@ local variables = interfaces.variables
moduledata.pstricks = moduledata.pstricks or { }
-local report_pstricks = logs.new("pstricks")
+local report_pstricks = logs.reporter("pstricks")
local template = [[
\starttext
diff --git a/tex/context/base/math-ext.lua b/tex/context/base/math-ext.lua
index 428bdad0a..75c6e4b26 100644
--- a/tex/context/base/math-ext.lua
+++ b/tex/context/base/math-ext.lua
@@ -11,7 +11,7 @@ local trace_virtual = false trackers.register("math.virtual", function(v) trace_
local mathematics = mathematics
local characters = characters
-local report_math = logs.new("mathematics")
+local report_math = logs.reporter("mathematics")
mathematics.extras = mathematics.extras or { }
local extras = mathematics.extras
diff --git a/tex/context/base/math-ini.lua b/tex/context/base/math-ini.lua
index 693709c63..c34e39bea 100644
--- a/tex/context/base/math-ini.lua
+++ b/tex/context/base/math-ini.lua
@@ -18,7 +18,7 @@ local allocate = utilities.storage.allocate
local trace_defining = false trackers.register("math.defining", function(v) trace_defining = v end)
-local report_math = logs.new("mathematics","initializing")
+local report_math = logs.reporter("mathematics","initializing")
mathematics = mathematics or { }
local mathematics = mathematics
diff --git a/tex/context/base/math-map.lua b/tex/context/base/math-map.lua
index 2b3a5e478..b6d57bff5 100644
--- a/tex/context/base/math-map.lua
+++ b/tex/context/base/math-map.lua
@@ -28,7 +28,7 @@ local texattribute = tex.attribute
local trace_greek = false trackers.register("math.greek", function(v) trace_greek = v end)
-local report_remapping = logs.new("mathematics","remapping")
+local report_remapping = logs.reporter("mathematics","remapping")
mathematics = mathematics or { }
local mathematics = mathematics
diff --git a/tex/context/base/math-noa.lua b/tex/context/base/math-noa.lua
index 1a337c8c9..6736181e6 100644
--- a/tex/context/base/math-noa.lua
+++ b/tex/context/base/math-noa.lua
@@ -43,8 +43,8 @@ local trace_remapping = false trackers.register("math.remapping", function(v)
local trace_processing = false trackers.register("math.processing", function(v) trace_processing = v end)
local trace_analyzing = false trackers.register("math.analyzing", function(v) trace_analyzing = v end)
-local report_processing = logs.new("mathematics","processing")
-local report_remapping = logs.new("mathematics","remapping")
+local report_processing = logs.reporter("mathematics","processing")
+local report_remapping = logs.reporter("mathematics","remapping")
local nodecodes = nodes.nodecodes
local noadcodes = nodes.noadcodes
diff --git a/tex/context/base/math-vfu.lua b/tex/context/base/math-vfu.lua
index 6a4e50898..e072fe83b 100644
--- a/tex/context/base/math-vfu.lua
+++ b/tex/context/base/math-vfu.lua
@@ -16,7 +16,7 @@ local max = math.max
local trace_virtual = false trackers.register("math.virtual", function(v) trace_virtual = v end)
local trace_timings = false trackers.register("math.timings", function(v) trace_timings = v end)
-local report_virtual = logs.new("fonts","virtual math")
+local report_virtual = logs.reporter("fonts","virtual math")
local fonts, nodes, mathematics = fonts, nodes, mathematics
diff --git a/tex/context/base/meta-pdf.lua b/tex/context/base/meta-pdf.lua
index 47a398e2c..b554810ee 100644
--- a/tex/context/base/meta-pdf.lua
+++ b/tex/context/base/meta-pdf.lua
@@ -14,7 +14,7 @@ local concat, format, gsub, find, byte, gmatch, match = table.concat, string.for
local lpegmatch = lpeg.match
local round = math.round
-local report_mptopdf = logs.new("graphics","mptopdf")
+local report_mptopdf = logs.reporter("graphics","mptopdf")
local mplib, metapost, lpdf, context = mplib, metapost, lpdf, context
diff --git a/tex/context/base/mlib-ctx.lua b/tex/context/base/mlib-ctx.lua
index 3baf29c2d..1a5ce2a24 100644
--- a/tex/context/base/mlib-ctx.lua
+++ b/tex/context/base/mlib-ctx.lua
@@ -11,7 +11,7 @@ if not modules then modules = { } end modules ['mlib-ctx'] = {
local format, concat = string.format, table.concat
local sprint = tex.sprint
-local report_metapost = logs.new("metapost")
+local report_metapost = logs.reporter("metapost")
local starttiming, stoptiming = statistics.starttiming, statistics.stoptiming
diff --git a/tex/context/base/mlib-pdf.lua b/tex/context/base/mlib-pdf.lua
index 403dbf0bd..b7f2863ad 100644
--- a/tex/context/base/mlib-pdf.lua
+++ b/tex/context/base/mlib-pdf.lua
@@ -11,7 +11,7 @@ local abs, sqrt, round = math.abs, math.sqrt, math.round
local allocate = utilities.storage.allocate
-local report_metapost = logs.new("metapost")
+local report_metapost = logs.reporter("metapost")
local mplib, context = mplib, context
diff --git a/tex/context/base/mlib-pps.lua b/tex/context/base/mlib-pps.lua
index f5f5b3472..3eb861342 100644
--- a/tex/context/base/mlib-pps.lua
+++ b/tex/context/base/mlib-pps.lua
@@ -25,7 +25,7 @@ local context = context
local trace_textexts = false trackers.register("metapost.textexts", function(v) trace_textexts = v end)
-local report_metapost = logs.new("metapost")
+local report_metapost = logs.reporter("metapost")
local colors = attributes.colors
diff --git a/tex/context/base/mlib-run.lua b/tex/context/base/mlib-run.lua
index 361298ed5..e35d92b28 100644
--- a/tex/context/base/mlib-run.lua
+++ b/tex/context/base/mlib-run.lua
@@ -31,7 +31,7 @@ nears zero.
This looks pretty ugly but we need to speed things up a bit.
---ldx]]-- - local moreinfo = [[ More information about ConTeXt and the tools that come with it can be found at: @@ -38,24 +34,12 @@ webpage : http://www.pragma-ade.nl / http://tex.aanhet.net wiki : http://contextgarden.net ]] --- local functions = { --- 'report', 'status', 'start', 'stop', 'line', 'direct', --- 'start_run', 'stop_run', --- 'start_page_number', 'stop_page_number', --- 'report_output_pages', 'report_output_log', --- 'report_tex_stat', 'report_job_stat', --- 'show_open', 'show_close', 'show_load', --- 'dummy', --- } - -- basic loggers local function ignore() end setmetatable(logs, { __index = function(t,k) t[k] = ignore ; return ignore end }) --- local separator = (tex and (tex.jobname or tex.formatname)) and ">" or "|" - local report, subreport, status, settarget if tex and tex.jobname or tex.formatname then @@ -185,7 +169,6 @@ function logs.reporter(category,subcategory) local logger = data[category] if not logger then local state = false ---~ print(category,states) if states == true then state = true elseif type(states) == "table" then @@ -340,27 +323,42 @@ logs.report_job_stat = statistics and statistics.showjobstat local report_files = logs.reporter("files") -local nesting = 0 -local verbose = false +local nesting = 0 +local verbose = false +local hasscheme = url.hasscheme + +-- we don't have show_open and show_close callbacks yet function logs.show_open(name) - if verbose then - nesting = nesting + 1 - report_files("level %s, opening %s",nesting,name) - end + -- if hasscheme(name) ~= "virtual" then + -- if verbose then + -- nesting = nesting + 1 + -- report_files("level %s, opening %s",nesting,name) + -- else + -- write(format("(%s",name)) -- tex adds a space + -- end + -- end end function logs.show_close(name) - if verbose then - report_files("level %s, closing %s",nesting,name) - nesting = nesting - 1 - end + -- if hasscheme(name) ~= "virtual" then + -- if verbose then + -- report_files("level %s, closing %s",nesting,name) + -- nesting = nesting - 1 + -- else + -- write(")") -- tex adds a space + -- end + -- end end function logs.show_load(name) - if verbose then - report_files("level %s, loading %s",nesting+1,name) - end + -- if hasscheme(name) ~= "virtual" then + -- if verbose then + -- report_files("level %s, loading %s",nesting+1,name) + -- else + -- write(format("(%s)",name)) + -- end + -- end end -- there may be scripts out there using this: diff --git a/tex/context/base/trac-pro.lua b/tex/context/base/trac-pro.lua index 596d40897..43c5ef7db 100644 --- a/tex/context/base/trac-pro.lua +++ b/tex/context/base/trac-pro.lua @@ -17,7 +17,7 @@ local getmetatable, setmetatable, rawset, type = getmetatable, setmetatable, raw local trace_namespaces = false trackers.register("system.namespaces", function(v) trace_namespaces = v end) -local report_system = logs.new("system","protection") +local report_system = logs.reporter("system","protection") namespaces = namespaces or { } local namespaces = namespaces diff --git a/tex/context/base/trac-set.lua b/tex/context/base/trac-set.lua index 6829f95b0..7eb92bfa6 100644 --- a/tex/context/base/trac-set.lua +++ b/tex/context/base/trac-set.lua @@ -312,7 +312,6 @@ if texconfig then local function set(k,v) v = tonumber(v) if v then ---~ print(k,v) texconfig[k] = v end end diff --git a/tex/context/base/typo-brk.lua b/tex/context/base/typo-brk.lua index 7111497fc..afea669ca 100644 --- a/tex/context/base/typo-brk.lua +++ b/tex/context/base/typo-brk.lua @@ -15,7 +15,7 @@ local format = string.format local trace_breakpoints = false trackers.register("typesetters.breakpoints", function(v) trace_breakpoints = v end) -local report_breakpoints = logs.new("typesetting","breakpoints") +local report_breakpoints = logs.reporter("typesetting","breakpoints") local nodes, node = nodes, node diff --git a/tex/context/base/typo-cap.lua b/tex/context/base/typo-cap.lua index f157ce875..aaa9de933 100644 --- a/tex/context/base/typo-cap.lua +++ b/tex/context/base/typo-cap.lua @@ -12,7 +12,7 @@ local div = math.div local trace_casing = false trackers.register("typesetters.casing", function(v) trace_casing = v end) -local report_casing = logs.new("typesetting","casing") +local report_casing = logs.reporter("typesetting","casing") local nodes, node = nodes, node diff --git a/tex/context/base/typo-dig.lua b/tex/context/base/typo-dig.lua index 3ef8e162b..fbbad96f8 100644 --- a/tex/context/base/typo-dig.lua +++ b/tex/context/base/typo-dig.lua @@ -15,7 +15,7 @@ local round, div = math.round, math.div local trace_digits = false trackers.register("typesetters.digits", function(v) trace_digits = v end) -local report_digits = logs.new("typesetting","digits") +local report_digits = logs.reporter("typesetting","digits") local nodes, node = nodes, node diff --git a/tex/context/base/typo-dir.lua b/tex/context/base/typo-dir.lua index 5a427ef55..49d58239d 100644 --- a/tex/context/base/typo-dir.lua +++ b/tex/context/base/typo-dir.lua @@ -18,7 +18,7 @@ local nodes, node = nodes, node local trace_directions = false trackers.register("typesetters.directions", function(v) trace_directions = v end) -local report_directions = logs.new("typesetting","directions") +local report_directions = logs.reporter("typesetting","directions") local has_attribute = node.has_attribute local unset_attribute = node.unset_attribute diff --git a/tex/context/base/typo-rep.lua b/tex/context/base/typo-rep.lua index f90ce16ef..78243229a 100644 --- a/tex/context/base/typo-rep.lua +++ b/tex/context/base/typo-rep.lua @@ -13,7 +13,7 @@ if not modules then modules = { } end modules ['typo-rep'] = { local trace_stripping = false trackers.register("nodes.stripping", function(v) trace_stripping = v end) trackers.register("fonts.stripping", function(v) trace_stripping = v end) -local report_stripping = logs.new("fonts","stripping") +local report_stripping = logs.reporter("fonts","stripping") local nodes, node = nodes, node diff --git a/tex/context/base/typo-spa.lua b/tex/context/base/typo-spa.lua index 2b89df515..310384aa8 100644 --- a/tex/context/base/typo-spa.lua +++ b/tex/context/base/typo-spa.lua @@ -15,7 +15,7 @@ local utfchar = utf.char local trace_spacing = false trackers.register("typesetters.spacing", function(v) trace_spacing = v end) -local report_spacing = logs.new("typesetting","spacing") +local report_spacing = logs.reporter("typesetting","spacing") local nodes, fonts, node = nodes, fonts, node diff --git a/tex/context/base/util-lua.lua b/tex/context/base/util-lua.lua index 93ae16f47..54c2468ba 100644 --- a/tex/context/base/util-lua.lua +++ b/tex/context/base/util-lua.lua @@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['util-lua'] = { utilities = utilities or {} utilities.lua = utilities.lua or { } -utilities.report = logs and logs.new("system") or print +utilities.report = logs and logs.reporter("system") or print function utilities.lua.compile(luafile,lucfile,cleanup,strip) -- defaults: cleanup=false strip=true utilities.report("lua: compiling %s into %s",luafile,lucfile) diff --git a/tex/context/base/util-mrg.lua b/tex/context/base/util-mrg.lua index 6eba76d99..3d8e79d93 100644 --- a/tex/context/base/util-mrg.lua +++ b/tex/context/base/util-mrg.lua @@ -14,7 +14,7 @@ local type, next = type, next utilities = utilities or {} utilities.merger = utilities.merger or { } -- maybe mergers -utilities.report = logs and logs.new("system") or print +utilities.report = logs and logs.reporter("system") or print local merger = utilities.merger diff --git a/tex/context/base/x-asciimath.lua b/tex/context/base/x-asciimath.lua index affb24ef9..50f4b0391 100644 --- a/tex/context/base/x-asciimath.lua +++ b/tex/context/base/x-asciimath.lua @@ -16,7 +16,7 @@ local asciimath = { } local moduledata = moduledata or { } moduledata.asciimath = asciimath -local report_asciimath = logs.new("mathematics","asciimath") +local report_asciimath = logs.reporter("mathematics","asciimath") local format = string.format local texsprint, ctxcatcodes = tex.sprint, tex.ctxcatcodes diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 6b0e89fa0..7bfc0e069 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 02/08/11 18:41:10 +-- merge date : 02/08/11 21:46:05 do -- begin closure to overcome local limits and interference @@ -2398,6 +2398,8 @@ storage = { -- probably no longer needed } logs = { new = function() return dummyfunction end, + reporter = function() return dummyfunction end, + messenger = function() return dummyfunction end, report = dummyfunction, } callbacks = { @@ -2601,7 +2603,7 @@ containers = containers or { } local containers = containers containers.usecache = true -local report_containers = logs.new("resolvers","containers") +local report_containers = logs.reporter("resolvers","containers") local function report(container,tag,name) if trace_cache or trace_containers then @@ -2874,7 +2876,7 @@ local next = next local trace_injections = false trackers.register("nodes.injections", function(v) trace_injections = v end) -local report_injections = logs.new("nodes","injections") +local report_injections = logs.reporter("nodes","injections") local attributes, nodes, node = attributes, nodes, node @@ -3327,7 +3329,7 @@ local write_nl = texio.write_nl local lower = string.lower local allocate, mark = utilities.storage.allocate, utilities.storage.mark -local report_defining = logs.new("fonts","defining") +local report_defining = logs.reporter("fonts","defining") fontloader.totable = fontloader.to_table @@ -3447,7 +3449,7 @@ local allocate = utilities.storage.allocate local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end) local trace_scaling = false trackers.register("fonts.scaling" , function(v) trace_scaling = v end) -local report_defining = logs.new("fonts","defining") +local report_defining = logs.reporter("fonts","defining") -- tfmdata has also fast access to indices and unicodes -- to be checked: otf -> tfm -> tfmscaled @@ -4259,7 +4261,7 @@ local lpegmatch = lpeg.match local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end) -local report_otf = logs.new("fonts","otf loading") +local report_otf = logs.reporter("fonts","otf loading") local fonts = fonts @@ -5381,7 +5383,7 @@ local utfbyte = utf.byte local trace_loading = false trackers.register("otf.loading", function(v) trace_loading = v end) local trace_unimapping = false trackers.register("otf.unimapping", function(v) trace_unimapping = v end) -local report_otf = logs.new("fonts","otf loading") +local report_otf = logs.reporter("fonts","otf loading") --[[ldx--Eventually this code will disappear because map files are kind @@ -5654,7 +5656,7 @@ if not modules then modules = { } end modules ['font-lua'] = { local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end) -local report_lua = logs.new("fonts","lua loading") +local report_lua = logs.reporter("fonts","lua loading") fonts.formats.lua = "lua" @@ -5728,7 +5730,7 @@ local trace_sequences = false trackers.register("otf.sequences", function(v) local trace_math = false trackers.register("otf.math", function(v) trace_math = v end) local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end) -local report_otf = logs.new("fonts","otf loading") +local report_otf = logs.reporter("fonts","otf loading") local starttiming, stoptiming, elapsedtime = statistics.starttiming, statistics.stoptiming, statistics.elapsedtime @@ -7679,7 +7681,7 @@ if not modules then modules = { } end modules ['font-otd'] = { local trace_dynamics = false trackers.register("otf.dynamics", function(v) trace_dynamics = v end) -local report_otf = logs.new("fonts","otf loading") +local report_otf = logs.reporter("fonts","otf loading") local fonts = fonts local otf = fonts.otf @@ -7853,7 +7855,7 @@ local trace_ligatures = false trackers.register("otf.ligatures", function local trace_kerns = false trackers.register("otf.kerns", function(v) trace_kerns = v end) local trace_preparing = false trackers.register("otf.preparing", function(v) trace_preparing = v end) -local report_prepare = logs.new("fonts","otf prepare") +local report_prepare = logs.reporter("fonts","otf prepare") local wildcard = "*" local default = "dflt" @@ -8371,11 +8373,11 @@ local trace_steps = false trackers.register("otf.steps", function local trace_skips = false trackers.register("otf.skips", function(v) trace_skips = v end) local trace_directions = false trackers.register("otf.directions", function(v) trace_directions = v end) -local report_direct = logs.new("fonts","otf direct") -local report_subchain = logs.new("fonts","otf subchain") -local report_chain = logs.new("fonts","otf chain") -local report_process = logs.new("fonts","otf process") -local report_prepare = logs.new("fonts","otf prepare") +local report_direct = logs.reporter("fonts","otf direct") +local report_subchain = logs.reporter("fonts","otf subchain") +local report_chain = logs.reporter("fonts","otf chain") +local report_process = logs.reporter("fonts","otf process") +local report_prepare = logs.reporter("fonts","otf prepare") trackers.register("otf.verbose_chain", function(v) otf.setcontextchain(v and "verbose") end) trackers.register("otf.normal_chain", function(v) otf.setcontextchain(v and "normal") end) @@ -11244,7 +11246,7 @@ local trace_loading = false trackers.register("otf.loading", function(v) trace_ local fonts = fonts local otf = fonts.otf -local report_otf = logs.new("fonts","otf loading") +local report_otf = logs.reporter("fonts","otf loading") -- instead of "script = "DFLT", langs = { 'dflt' }" we now use wildcards (we used to -- have always); some day we can write a "force always when true" trick for other @@ -15451,7 +15453,7 @@ local directive_embedall = false directives.register("fonts.embedall", function trackers.register("fonts.loading", "fonts.defining", "otf.loading", "afm.loading", "tfm.loading") trackers.register("fonts.all", "fonts.*", "otf.*", "afm.*", "tfm.*") -local report_defining = logs.new("fonts","defining") +local report_defining = logs.reporter("fonts","defining") --[[ldx--
Here we deal with defining fonts. We do so by intercepting the -- cgit v1.2.3