summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/lpdf-rul.lmt
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-12-30 19:47:30 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-12-30 19:47:30 +0100
commit9b1c3470a7a222ef9ae20106d750c4a0127819a7 (patch)
tree746f1a65eb69b87ea33e07ab4730540a8a8d50c9 /tex/context/base/mkxl/lpdf-rul.lmt
parentcefe8d703dd66048fa9d259b697609bd539a7bce (diff)
downloadcontext-9b1c3470a7a222ef9ae20106d750c4a0127819a7.tar.gz
2021-12-30 19:03:00
Diffstat (limited to 'tex/context/base/mkxl/lpdf-rul.lmt')
-rw-r--r--tex/context/base/mkxl/lpdf-rul.lmt16
1 files changed, 11 insertions, 5 deletions
diff --git a/tex/context/base/mkxl/lpdf-rul.lmt b/tex/context/base/mkxl/lpdf-rul.lmt
index 4c7bcf633..96b4597bb 100644
--- a/tex/context/base/mkxl/lpdf-rul.lmt
+++ b/tex/context/base/mkxl/lpdf-rul.lmt
@@ -101,12 +101,18 @@ def RuleColor = %color% enddef ;
local initialized = false ;
local function rule_mp(p,h,v,i,n)
- local name = p.name or "fake:rest"
- local code = (predefined[name] or predefined["fake:rest"]) {
+ local name = p.name or "fake:rest"
+ local ht = p.height or 0
+ local dp = p.depth or 0
+ local total = ht + dp
+ local code = (predefined[name] or predefined["fake:rest"]) {
data = p.data or "",
- width = p.width * bpfactor,
- height = p.height * bpfactor,
- depth = p.depth * bpfactor,
+ -- width = p.width * bpfactor,
+ -- height = p.height * bpfactor,
+ -- depth = p.depth * bpfactor,
+ width = h * bpfactor,
+ height = v * bpfactor * ht / total,
+ depth = v * bpfactor * dp / total,
factor = (p.factor or 0) * bpfactor, -- needs checking
offset = p.offset or 0,
line = (p.line or 65536) * bpfactor,