summaryrefslogtreecommitdiff
path: root/tex/context/base/font-ini.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/font-ini.lua')
-rw-r--r--tex/context/base/font-ini.lua21
1 files changed, 20 insertions, 1 deletions
diff --git a/tex/context/base/font-ini.lua b/tex/context/base/font-ini.lua
index 6bebf6a86..5feb512b0 100644
--- a/tex/context/base/font-ini.lua
+++ b/tex/context/base/font-ini.lua
@@ -11,6 +11,8 @@ if not modules then modules = { } end modules ['font-ini'] = {
--ldx]]--
local utf = unicode.utf8
+local format, serialize = string.format, table.serialize
+local write_nl = texio.write_nl
if not fontloader then fontloader = fontforge end
@@ -91,7 +93,24 @@ function fonts.show_char_data(n)
end
local chr = tfmdata.characters[n]
if chr then
- texio.write_nl(table.serialize(chr,string.format("U_%04X",n)))
+ write_nl(format("%s @ %s => U%04X => %s => ",tfmdata.fullname,tfmdata.size,n,utf.char(n)) .. serialize(chr,false))
+ end
+ end
+end
+
+function fonts.show_font_parameters()
+ local tfmdata = fonts.ids[font.current()]
+ if tfmdata then
+ local parameters, mathconstants = tfmdata.parameters, tfmdata.MathConstants
+ local hasparameters, hasmathconstants = parameters and next(parameters), mathconstants and next(mathconstants)
+ if hasparameters then
+ write_nl(format("%s @ %s => parameters => ",tfmdata.fullname,tfmdata.size) .. serialize(parameters,false))
+ end
+ if hasmathconstants then
+ write_nl(format("%s @ %s => math constants => ",tfmdata.fullname,tfmdata.size) .. serialize(mathconstants,false))
+ end
+ if not hasparameters and not hasmathconstants then
+ write_nl(format("%s @ %s => no parameters and/or mathconstants",tfmdata.fullname,tfmdata.size))
end
end
end