summaryrefslogtreecommitdiff
path: root/tex/context/base/font-ini.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2009-10-16 16:13:00 +0200
committerHans Hagen <pragma@wxs.nl>2009-10-16 16:13:00 +0200
commit7f9b179ad5be5000f67192f283d20e7120402bd9 (patch)
tree18f83a8cbfe7fed1c2a6939fb4b2cf10473abbbe /tex/context/base/font-ini.lua
parentc878054f6360d50885dbdab96643a8f3ac61c46c (diff)
downloadcontext-7f9b179ad5be5000f67192f283d20e7120402bd9.tar.gz
beta 2009.10.16 16:13
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