pixi-tagged-text icon indicating copy to clipboard operation
pixi-tagged-text copied to clipboard

How to set text in middle when use "lineHeight"

Open q1998763 opened this issue 2 years ago • 1 comments

code: const t = new TaggedText('hello world', { default: { wordWrap: true, wordWrapWidth: 50, valign: 'middle', lineHeight: 50 } }, { debug: true })

I got image

But I want the text in vertical middle. Sorry for my poor english.

q1998763 avatar Apr 06 '22 08:04 q1998763

Vertical align will change how the whole paragraph appaers within it's bounding box but doesn't work on each line. I've honestly never tried this before and I'm not sure whether it should be considered a bug.

You might try adjustBaseline to bush the line down to the middle

mimshwright avatar May 11 '22 21:05 mimshwright