summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/trac-vis.lmt
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2022-11-14 23:18:10 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2022-11-14 23:18:10 +0100
commit08473f11287cb263079c0435068312cbc6d736e8 (patch)
tree2548fb8b58e18a507e54fa8426a79c6956c3ef2e /tex/context/base/mkxl/trac-vis.lmt
parentdd0a80e5ec42f60832e7d5dc47210e6f3545c400 (diff)
downloadcontext-08473f11287cb263079c0435068312cbc6d736e8.tar.gz
2022-11-14 22:56:00
Diffstat (limited to 'tex/context/base/mkxl/trac-vis.lmt')
-rw-r--r--tex/context/base/mkxl/trac-vis.lmt26
1 files changed, 16 insertions, 10 deletions
diff --git a/tex/context/base/mkxl/trac-vis.lmt b/tex/context/base/mkxl/trac-vis.lmt
index e2c79022a..09c0e020c 100644
--- a/tex/context/base/mkxl/trac-vis.lmt
+++ b/tex/context/base/mkxl/trac-vis.lmt
@@ -41,6 +41,7 @@ local setattr = nuts.setattr
local setwidth = nuts.setwidth
local setshift = nuts.setshift
local setoffsets = nuts.setoffsets
+local getglyphdimensions = nuts.getglyphdimensions
local getid = nuts.getid
local getfont = nuts.getfont
@@ -922,22 +923,27 @@ local ruledglyph do
-- local ligature_code = 0x8000 + nodes.glyphcodes.ligature
ruledglyph = function(head,current,previous) -- wrong for vertical glyphs
- local wd = getwidth(current)
+ local wd, ht, dp = getglyphdimensions(current)
if wd ~= 0 then
- local wd, ht, dp = getwhd(current)
local next = getnext(current)
local prev = previous
setboth(current)
local linewidth = emwidth/(2*fraction)
local x_offset, y_offset, l_margin, r_margin, raise = getoffsets(current)
- local info = setlink((dp == 0 and outlinerule and outlinerule(wd,ht,dp,linewidth)) or userrule {
- width = wd,
- height = ht,
- depth = dp,
- line = linewidth,
- type = "box",
- },new_kern(-wd))
- -- if getsubtype(n) == ligature_code then
+-- local info = setlink((dp == 0 and outlinerule and outlinerule(wd,ht,dp,linewidth)) or userrule {
+-- width = wd,
+-- height = ht,
+-- depth = dp,
+-- line = linewidth,
+-- type = "box",
+-- },new_kern(-wd))
+local info = (dp == 0 and outlinerule and outlinerule(wd,ht,dp,linewidth)) or userrule {
+ width = wd,
+ height = ht,
+ depth = dp,
+ line = linewidth,
+ type = "box",
+}
local c, f = isglyph(current)
local char = chardata[f][c]
if char and type(char.unicode) == "table" then -- hackery test