From a894f2e8c02c29b8ddeec3094acc1859ab34f864 Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 31 Jan 2011 00:28:38 +0200 Subject: beta 2011.01.24 10:00 --- tex/context/base/s-fnt-26.mkiv | 74 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 tex/context/base/s-fnt-26.mkiv (limited to 'tex/context/base/s-fnt-26.mkiv') diff --git a/tex/context/base/s-fnt-26.mkiv b/tex/context/base/s-fnt-26.mkiv new file mode 100644 index 000000000..18d1d6573 --- /dev/null +++ b/tex/context/base/s-fnt-26.mkiv @@ -0,0 +1,74 @@ +%D \module +%D [ file=s-fnt-26, +%D version=2009.10.26, +%D title=\CONTEXT\ Style File, +%D subtitle=Goodies Tables, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright=PRAGMA] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\startluacode + + function document.show_goodies_stylistics(name) + local goodies = fonts.goodies.get(name) + local stylistics = goodies and goodies.stylistics + if stylistics then + local col, row, type = context.NC, context.NR, context.type + context.starttabulate { "|l|pl|" } + col() context("feature") col() context("meaning") col() row() + for feature, meaning in table.sortedpairs(stylistics) do + col() type(feature) col() type(meaning) col() row() + end + context.stoptabulate() + end + end + + function document.show_goodies_featuresets(name) + local goodies = fonts.goodies.get(name) + local featuresets = goodies and goodies.featuresets + if featuresets then + local col, row, type = context.NC, context.NR, context.type + context.starttabulate { "|l|pl|" } + col() context("featureset") col() context("definitions") col() row() + for featureset, definitions in table.sortedpairs(featuresets) do + col() type(featureset) col() + for k, v in table.sortedpairs(definitions) do + type(string.format("%s=%s",k,tostring(v))) + context.quad() + end + col() row() + end + context.stoptabulate() + end + end + + function document.show_goodies_colorschemes(name) + local goodies = fonts.goodies.get(name) + local colorschemes = goodies and goodies.colorschemes + if colorschemes then + local col, row, type = context.NC, context.NR, context.type + context.starttabulate { "|l|pl|" } + col() context("colorscheme") col() context("numbers") col() row() + for colorscheme, numbers in table.sortedpairs(colorschemes) do + col() type(colorscheme) col() + for i=1,#numbers do + type(i) + context.quad() + end + col() row() + end + context.stoptabulate() + end + end + +\stopluacode + +\def\showgoodiesstylistics #1{\ctxlua{document.show_goodies_stylistics ("#1")}} +\def\showgoodiesfeaturesets #1{\ctxlua{document.show_goodies_featuresets ("#1")}} +\def\showgoodiescolorschemes#1{\ctxlua{document.show_goodies_colorschemes("#1")}} + +\endinput -- cgit v1.2.3