[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Issue #3947] fixing \huge et al.
From: |
Kieren MacMillan |
Subject: |
[Issue #3947] fixing \huge et al. |
Date: |
Wed, 7 Jun 2017 14:17:45 -0400 |
Hello all,
Thanks to some help (on the user-list) from David K, I've started to attack
issue #3947.
(I figured this would be a nice, relatively painless way to get my feet wet in
the dev/git/patch process.)
The snippet included below is what I have so far. It appears to work as hoped.
Two questions:
1. Does the skip appear *roughly* right to people? (I plan to use a
mathematical interpolation/model/formula, but wanted to get
approval/concensus/comments first.)
2. Seems like a lot of redundant coding here… Should I add an abstracted
function (e.g., fontsizer), which is then called by \huge et al.?
Thanks,
Kieren.
%%% SNIPPET BEGINS
\version "2.19.61"
#(define-markup-command (huge layout props arg)
(markup?)
#:category font
"Set font size to +2.
@lilypond[verbatim,quote]
\\markup {
default
\\hspace #2
\\huge
huge
}
@end lilypond"
(interpret-markup layout (prepend-alist-chain 'baseline-skip 4
(prepend-alist-chain 'font-size 2 props)) arg))
#(define-markup-command (large layout props arg)
(markup?)
#:category font
"Set font size to +1.
@lilypond[verbatim,quote]
\\markup {
default
\\hspace #2
\\large
large
}
@end lilypond"
(interpret-markup layout (prepend-alist-chain 'baseline-skip 3.625
(prepend-alist-chain 'font-size 1 props)) arg))
#(define-markup-command (normalsize layout props arg)
(markup?)
#:category font
"Set font size to default.
@lilypond[verbatim,quote]
\\markup {
\\teeny {
this is very small
\\hspace #2
\\normalsize {
normal size
}
\\hspace #2
teeny again
}
}
@end lilypond"
(interpret-markup layout (prepend-alist-chain 'baseline-skip 3
(prepend-alist-chain 'font-size 0 props)) arg))
#(define-markup-command (small layout props arg)
(markup?)
#:category font
"Set font size to -1.
@lilypond[verbatim,quote]
\\markup {
default
\\hspace #2
\\small
small
}
@end lilypond"
(interpret-markup layout (prepend-alist-chain 'baseline-skip 2.5
(prepend-alist-chain 'font-size -1 props)) arg))
#(define-markup-command (tiny layout props arg)
(markup?)
#:category font
"Set font size to -2.
@lilypond[verbatim,quote]
\\markup {
default
\\hspace #2
\\tiny
tiny
}
@end lilypond"
(interpret-markup layout (prepend-alist-chain 'baseline-skip 2.3
(prepend-alist-chain 'font-size -2 props)) arg))
#(define-markup-command (teeny layout props arg)
(markup?)
#:category font
"Set font size to -3.
@lilypond[verbatim,quote]
\\markup {
default
\\hspace #2
\\teeny
teeny
}
@end lilypond"
(interpret-markup layout (prepend-alist-chain 'baseline-skip 2.125
(prepend-alist-chain 'font-size -3 props)) arg))
loremIpsum = \markup \wordwrap {
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate
velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident,
sunt in culpa qui officia deserunt mollit anim id est laborum.
}
\markup \loremIpsum
\markup \vspace #2
\markup \huge \loremIpsum
\markup \vspace #2
\markup \large \loremIpsum
\markup \vspace #2
\markup \normalsize \loremIpsum
\markup \vspace #2
\markup \small \loremIpsum
\markup \vspace #2
\markup \tiny \loremIpsum
\markup \vspace #2
\markup \teeny \loremIpsum
%%% SNIPPET ENDS
________________________________
Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: address@hidden
- [Issue #3947] fixing \huge et al.,
Kieren MacMillan <=