summaryrefslogtreecommitdiff
path: root/tex/context/base/s-fnt-10.mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2011-03-27 14:48:00 +0200
committerHans Hagen <pragma@wxs.nl>2011-03-27 14:48:00 +0200
commit87ed7a9114b94007ff9ceaa83287772577c2ec54 (patch)
tree3e544ac67f1d47f693a4c759e6cdce01650c36d0 /tex/context/base/s-fnt-10.mkiv
parent558dac3230c8a47d17fd4ad80201b0ccabb1fb55 (diff)
downloadcontext-87ed7a9114b94007ff9ceaa83287772577c2ec54.tar.gz
beta 2011.03.27 14:48
Diffstat (limited to 'tex/context/base/s-fnt-10.mkiv')
-rw-r--r--tex/context/base/s-fnt-10.mkiv40
1 files changed, 18 insertions, 22 deletions
diff --git a/tex/context/base/s-fnt-10.mkiv b/tex/context/base/s-fnt-10.mkiv
index c76574d6d..d5f097300 100644
--- a/tex/context/base/s-fnt-10.mkiv
+++ b/tex/context/base/s-fnt-10.mkiv
@@ -12,23 +12,21 @@
%C details.
\startluacode
-local format, sprint = string.format, tex.sprint
-
local fontdata = fonts.hashes.identifiers
-function fonts.handlers.otf.show_all()
- local tfmdata = fontdata[font.current()]
- if tfmdata and tfmdata.shared then
- local NC, NR, char = context.NC, context.NR, context.char
- context.starttabulate { "|l|r|c|" }
- for unicode, description in fonts.iterators.characters(tfmdata) do
- NC() context(description.name) NC() context(unicode) NC() char(unicode) NC() NR()
- end
- context.stoptabulate()
- end
-end
+-- function fonts.tracers.show_all()
+-- local tfmdata = fontdata[font.current()]
+-- if tfmdata and tfmdata.shared then
+-- local NC, NR, char = context.NC, context.NR, context.char
+-- context.starttabulate { "|l|r|c|" }
+-- for unicode, description in fonts.iterators.characters(tfmdata) do
+-- NC() context(description.name) NC() context(unicode) NC() char(unicode) NC() NR()
+-- end
+-- context.stoptabulate()
+-- end
+-- end
-function fonts.show_all()
+function fonts.tracers.show_all()
local tfmdata = fontdata[font.current()]
if tfmdata then
local NC, NR, HL, char, bold, tttf = context.NC, context.NR, context.HL, context.char, context.bold, context.tttf
@@ -90,13 +88,11 @@ function fonts.show_all()
end
end
-function fonts.show_glyphs()
+function fonts.tracers.show_glyphs()
local tfmdata = fontdata[font.current()]
if tfmdata then
- for k, v in ipairs(table.sortedkeys(tfmdata.characters)) do
- if v >=0 then
- context.showglyph(v) -- local macro
- end
+ for unicode, chr in fonts.iterators.characters(tfmdata) do
+ context.showglyph(unicode)
end
end
end
@@ -115,7 +111,7 @@ end
\nonknuthmode
\startcolumns[n=#3]
\TestFont
- \ctxlua { fonts.show_all() }
+ \ctxlua { fonts.tracers.show_all() }
\stopcolumns
\page
\egroup}
@@ -134,12 +130,12 @@ end
\nonknuthmode
\startcolumns[n=#3]
\TestFontB
- \ctxlua { fonts.show_glyphs() }
+ \ctxlua { fonts.tracers.show_glyphs() }
\stopcolumns
\page
\egroup}
-% \doifnotmode{demo} {\endinput}
+\doifnotmode{demo} {\endinput}
\starttext