From f93975efd76053e907d19114d4ba576ae44da134 Mon Sep 17 00:00:00 2001
From: Marius <mariausol@gmail.com>
Date: Wed, 20 Oct 2010 00:20:12 +0300
Subject: beta 2010.10.19 23:03

---
 tex/context/base/s-fnt-11.tex | 36 ++++++++++++++++++++++++------------
 1 file changed, 24 insertions(+), 12 deletions(-)

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

diff --git a/tex/context/base/s-fnt-11.tex b/tex/context/base/s-fnt-11.tex
index 8f855cc72..f2171ecd0 100644
--- a/tex/context/base/s-fnt-11.tex
+++ b/tex/context/base/s-fnt-11.tex
@@ -26,19 +26,31 @@
 function fonts.names.table(pattern,reload,all)
     local t = fonts.names.list(pattern,reload)
     if t then
-        tex.sprint(tex.ctxcatcodes,"\\start\\nonknuthmode\\starttabulate[|T|T|T|T|T|]")
-        tex.sprint(tex.ctxcatcodes,"\\NC hashname\\NC type\\NC fontname\\NC filename\\NC\\NR\\HL")
-        for v,tv in table.sortedpairs(t) do
-            local kind, name, file = tv[1], tv[2], tv[3]
-            if all or v == string.lower(name) then
-                if kind and name and file then
-                    tex.sprint(tex.ctxcatcodes,string.format("\\NC %s\\NC %s\\NC %s\\NC %s\\NC\\NR",v,kind,name,file))
-                else
-                    logs.report("font table", "skipping %s", v)
+        local NC, NR, HL = context.NC, context.NR, context.HL
+        context.start()
+            context.nonknuthmode()
+            context.starttabulate { "|T|T|T|T|T|" }
+                NC(false,hashname)
+                NC(false,type)
+                NC(false,fontname)
+                NC(false,filename)
+                NC() NR() HL()
+                for v,tv in table.sortedpairs(t) do
+                    local kind, name, file = tv[1], tv[2], tv[3]
+                    if all or v == string.lower(name) then
+                        if kind and name and file then
+                            NC(false,v)
+                            NC(false,kind)
+                            NC(false,name)
+                            NC(false,file)
+                            NC() NR()
+                        else
+                            logs.report("font table", "skipping %s", v)
+                        end
+                    end
                 end
-            end
-        end
-        tex.sprint(tex.ctxcatcodes,"\\stoptabulate\\stop")
+            context.stoptabulate()
+        context.stop()
     end
 end
 \stopluacode
-- 
cgit v1.2.3

