Weirdness: Text -> Default position from staff

See the attached example.

I have text where there is two text sizes in the text box, and in Engraving Options, “Default position from staff” = 1 spaces.

It looks to me like this algorithm is based on the size of the text at the first character of text, not what is in the last line, resulting in seemingly different spacings from the top of the staff when I have this kind of text size change. I’m not sure how to ‘fix’ this alignment so that all of the text appears the same distance above the staff besides selecting each offending text and manually adding a placement offset.

It also makes me wonder why the decision to refer to “x spaces” above a staff refers to text size and not staff size.

It seems to have more to do with multi-line text vs a single line. You could try reducing the leading in Engrave > Paragraph Styles. This reduces the line spacing.

Craig is along the right lines. When we have a single-line text item, which is by far the most common kind of text item encountered, we can use the detailed metrics of the font to work out where the baseline is and then position the baseline the desired number of spaces away from the staff (and that measurement has nothing to do with the font size; it really is the prevailing space size). But with a multi-line text item, for various reasons it’s not currently possible to calculate the same metrics, and so a multi-line text item gets positioned relative to its overall bounding rectangle.

Fair enough. Shame on me for trying to use multi-line text items with more than one text size!


Interesting - although my inner nerd suggests that the provided algorithm is perhaps too complicated. At the very least, IMHO there needs to be more clarification with the “Engraving Options -> Default position in staff” description.

(and that measurement has nothing to do with the font size; it really is the prevailing space size).

Uh, how does space size have nothing to do with font size?

They’re simply two different things…

The space size is the gap between two lines on a five line stave.

Then the bounding rectangle has extra space if I make a smaller font in the last line as in my example.

Go ahead and test this: create a multi-line text with two different font sizes on two different lines and see how the spacing changes as font size changes.