[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: baseline-skip affects font size???
From: |
Thomas Morley |
Subject: |
Re: baseline-skip affects font size??? |
Date: |
Wed, 30 Jul 2014 23:43:22 +0200 |
2014-07-30 17:27 GMT+02:00 Richard Shann <address@hidden>:
> Dear List,
>
> I'm trying to write customized chord symbols, for better visibility when
> chord charts are displayed on smartphones. In this example I am trying
> to place an "m" above a white triangle after the chord name.
> I see that baseline-skip is affecting the size of the white triangle,
> which doesn't seem to be what's in the documentation.
> In fact with \override #'(baseline-skip . 0) I get no white triangle
> visible.
>
> \version "2.18.0"
> chExceptionMusic = {
> <c' ees' g'>1 -\markup { \override #'(baseline-skip . 4) \column { "m"
> \tiny \triangle ##f }}
> }
> % Convert music to list and prepend to existing exceptions.
> chExceptions = #( append
> ( sequential-music-to-chord-exceptions chExceptionMusic #t)
> ignatzekExceptions)
>
> \score {
>
> \context ChordNames {
> \set chordNameExceptions = #chExceptions
> <c' ees' g'>
> }
> }
>
> The example by the way, is fictitious, someone else will be providing me
> with real examples, but this is the sort of thing that will be needed,
> trading vertical for horizontal space.
>
> Any guidance on this?
>
> Richard Shann
Your observation is correct.
The triangle-markup-command uses baseline-skip to determine the size.
Looks very strange to me. I'd call it a bug worth fixing, though I've
no clue why it was put in this way at first place. Perhaps there was a
reason.
cc-ing bug-list
% c/p from define-markup-cpmmands.scm
#(define-markup-command (triangle layout props filled)
(boolean?)
#:category graphic
#:properties ((thickness 0.1)
(font-size 0)
(baseline-skip 2))
"
@cindex drawing triangles within text
A triangle, either filled or empty.
@lilypond[verbatim,quote]
\\markup {
\\triangle ##t
\\hspace #2
\\triangle ##f
}
@end lilypond"
(let ((ex (* (magstep font-size) 0.8 baseline-skip)))
% ^^^^^^^^^^^^^^^^^^^^^^^^^^^
(ly:make-stencil
`(polygon '(0.0 0.0
,ex 0.0
,(* 0.5 ex)
,(* 0.86 ex))
,thickness
,filled)
(cons 0 ex)
(cons 0 (* .86 ex)))))
\markup \override #'(baseline-skip . 0) \triangle ##f
\markup \override #'(baseline-skip . 1) \triangle ##f
\markup \override #'(baseline-skip . 2) \triangle ##f
\markup \override #'(baseline-skip . 3) \triangle ##f
\markup \override #'(baseline-skip . 4) \triangle ##f
Cheers,
Harm
- Re: baseline-skip affects font size???,
Thomas Morley <=