From 85b7bc695629926641c7cb752fd478adfdf374f3 Mon Sep 17 00:00:00 2001
From: Marius <mariausol@gmail.com>
Date: Sun, 4 Jul 2010 15:32:09 +0300
Subject: stable 2010-05-24 13:10

---
 tex/context/base/s-fnt-26.tex | 73 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)
 create mode 100644 tex/context/base/s-fnt-26.tex

(limited to 'tex/context/base/s-fnt-26.tex')

diff --git a/tex/context/base/s-fnt-26.tex b/tex/context/base/s-fnt-26.tex
new file mode 100644
index 000000000..026abf29b
--- /dev/null
+++ b/tex/context/base/s-fnt-26.tex
@@ -0,0 +1,73 @@
+%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
+
+\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

