[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help a newb: Formatting custom instrument names
From: |
Lukas-Fabian Moser |
Subject: |
Re: Help a newb: Formatting custom instrument names |
Date: |
Mon, 7 Dec 2020 22:22:27 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
Hi Michael,
So far I’ve only been able to assign the column of text to the
instrument name, but it’s WAY to big and spaced out. I tried to find
the commands to tweak the instrument name in the reference manuals,
but I just couldn’t figure it out. I need to tweak the size of the
font, the vertical scale (assuming the characters are evenly spaced
vertically) and the position. Can anyone help out a hapless newbie?
Maybe something like this?
\version "2.21.80"
\layout {
indent = 5
}
#(define-markup-command (unit-height layout props arg) (markup?)
(let* ((stil (interpret-markup layout props arg))
(x (ly:stencil-extent stil 0)))
(interpret-markup layout props
(make-with-dimensions-markup x '(-0.5 . 0.5)
(markup #:general-align 1 0 arg)))))
#(define-markup-command (unit-height-column layout props args)
(markup-list?)
(interpret-markup layout props #{
\markup {
\override #'(baseline-skip . 0)
\center-column \unit-height #args
} #}))
\new Staff \with {
\override StaffSymbol.line-count = 12
instrumentName = \markup {
\override #'(font-size . -10)
\unit-height-column { First second third fourth fifth sixth seventh
eighth ninth tenth eleventh } } }
{ a'4 }
The command \unit-height forces a markup to have Y dimension exactly
-0.5 to 0.5 (hence, one staff space), no matter its actual size.
\unit-height-column the given elements in a (horizontally centered)
column, stacked without padding between the lines.
Lukas
image.png
Description: PNG image
- Help a newb: Formatting custom instrument names, Michael Blankenship, 2020/12/07
- Re: Help a newb: Formatting custom instrument names, Hwaen Ch'uqi, 2020/12/07
- Re: Help a newb: Formatting custom instrument names,
Lukas-Fabian Moser <=
- Re: Help a newb: Formatting custom instrument names, Lukas-Fabian Moser, 2020/12/07
- Re: Help a newb: Formatting custom instrument names, Leo Correia de Verdier, 2020/12/07
- Re: Help a newb: Formatting custom instrument names, Lukas-Fabian Moser, 2020/12/08
- Re: Help a newb: Formatting custom instrument names, Michael Blankenship, 2020/12/08
- Re: Help a newb: Formatting custom instrument names, Michael Blankenship, 2020/12/08
- Re: Help a newb: Formatting custom instrument names, Michael Blankenship, 2020/12/08
- Re: Help a newb: Formatting custom instrument names, Lukas-Fabian Moser, 2020/12/08