diff --git a/src/renderer.typ b/src/renderer.typ index 6070c3b..426a0a7 100644 --- a/src/renderer.typ +++ b/src/renderer.typ @@ -190,10 +190,15 @@ if config.left-labels { // desc-x is the right edge of the label when they are on the left, so shift - // to its left edge: exactly the box width when wrapping, an estimate from - // the character count otherwise + // to its left edge txt-x -= if config.description-width == none { - range_.description.len() * config.default-font-size / 2pt + // the set rule in render is not in scope here, so measure the text with + // the font it will be drawn in + measure(text( + range_.description, + font: config.default-font-family, + size: config.default-font-size + )).width.pt() } else { config.description-width }