From 631393e12fad038adbe9ab8408b89a7b5335820c Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 8 Feb 2011 18:41:00 +0100 Subject: beta 2011.02.08 18:41 --- tex/context/fonts/demo.lfg | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'tex/context/fonts') diff --git a/tex/context/fonts/demo.lfg b/tex/context/fonts/demo.lfg index b27db8545..c76a58d25 100644 --- a/tex/context/fonts/demo.lfg +++ b/tex/context/fonts/demo.lfg @@ -11,6 +11,25 @@ local smallcaps = { smcp = yes, } +local report_statistics = logs.reporter("fonts","statistics") + +local function statistics(tfmdata) + for k, v in table.sortedpairs(tfmdata) do + if type(v) == "table" then + report_statistics("%s: ",k) + else + report_statistics("%s: %s",k,tostring(v)) + end + end +end + +local function squeeze(tfmdata) + for k, v in next, tfmdata.characters do + v.height = 0.75 * (v.height or 0) + v.depth = 0.75 * (v.depth or 0) + end +end + return { name = "demo", version = "1.00", @@ -33,5 +52,9 @@ return { "two", "four", "six", "eight", "ten", }, } - } + }, + postprocessors = { + statistics = statistics, + squeeze = squeeze, + }, } -- cgit v1.2.3