summaryrefslogtreecommitdiff
path: root/tex/context/fonts
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2011-02-08 18:41:00 +0100
committerHans Hagen <pragma@wxs.nl>2011-02-08 18:41:00 +0100
commit631393e12fad038adbe9ab8408b89a7b5335820c (patch)
treec7b8f5e93fbf92550917b3235cff6f669ca5db01 /tex/context/fonts
parent94397b74482b88818f737145af99c883802210d7 (diff)
downloadcontext-631393e12fad038adbe9ab8408b89a7b5335820c.tar.gz
beta 2011.02.08 18:41
Diffstat (limited to 'tex/context/fonts')
-rw-r--r--tex/context/fonts/demo.lfg25
1 files changed, 24 insertions, 1 deletions
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: <table>",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,
+ },
}