diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/lxml-css.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/lxml-css.lua | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/context/base/lxml-css.lua b/Master/texmf-dist/tex/context/base/lxml-css.lua index c5a85c2bd6f..0deaea4d391 100644 --- a/Master/texmf-dist/tex/context/base/lxml-css.lua +++ b/Master/texmf-dist/tex/context/base/lxml-css.lua @@ -30,8 +30,9 @@ if tex then local exheights = fonts.hashes.exheights local emwidths = fonts.hashes.emwidths + local texget = tex.get - percentage = function(s,pcf) return tonumber(s) * (pcf or tex.hsize) end + percentage = function(s,pcf) return tonumber(s) * (pcf or texget("hsize")) end exheight = function(s,exf) return tonumber(s) * (exf or exheights[true]) end emwidth = function(s,emf) return tonumber(s) * (emf or emwidths[true]) end pixels = function(s,pxf) return tonumber(s) * (pxf or emwidths[true]/300) end @@ -109,17 +110,17 @@ css.padding = padding -- print(padding("0",pixel,hsize,exheight,emwidth)) --- local currentfont = font.current --- local texdimen = tex.dimen --- local hashes = fonts.hashes --- local quads = hashes.quads --- local xheights = hashes.xheights +-- local currentfont = font.current +-- local texget = tex.get +-- local hashes = fonts.hashes +-- local quads = hashes.quads +-- local xheights = hashes.xheights -- -- local function padding(str) -- local font = currentfont() -- local exheight = xheights[font] -- local emwidth = quads[font] --- local hsize = texdimen.hsize/100 +-- local hsize = texget("hsize")/100 -- local pixel = emwidth/100 -- return padding(str,pixel,hsize,exheight,emwidth) -- end |