summaryrefslogtreecommitdiff
path: root/tex/context/base/x-css.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/x-css.lua')
-rw-r--r--tex/context/base/x-css.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/tex/context/base/x-css.lua b/tex/context/base/x-css.lua
index da21fd21b..1bf559d66 100644
--- a/tex/context/base/x-css.lua
+++ b/tex/context/base/x-css.lua
@@ -73,14 +73,16 @@ css.padding = padding
-- print(padding("10pt 20pt 30pt",pixel,hsize,exheight,emwidth))
-- print(padding("10pt 20pt 30pt 40pt",pixel,hsize,exheight,emwidth))
-local fontidentifiers = fonts.identifiers
local currentfont = font.current
-local texdimen = tex.dimen
+local texdimen = tex.dimen
+local hashes = fonts.hashes
+local quads = hashes.quads
+local xheights = hashes.xheights
local function padding(str)
- local fnt = fontidentifiers[currentfont()]
- local exheight = fnt.ex_height
- local emwidth = fnt.quad
+ local font = currentfont()
+ local exheight = xheights[font]
+ local emwidth = quads[font]
local hsize = texdimen.hsize/100
local pixel = emwidth/100
return padding(str,pixel,hsize,exheight,emwidth)