Re: Access font-name in markup functions

2012-04-26 Thread Urs Liska

Hello Jan-Peter,

thank you for this information.
This is exactly what I needed!

Can I find this in the docs? To get a better understanding ...

Best
Urs

Am 25.04.2012 10:37, schrieb Jan-Peter Voigt:

Hello Urs,

if you are using the current devel version, you can wrap any markup 
with #{ #}

--snip--
\version 2.15.37

#(define-markup-command (nfont layout props arg)(markup?)
  (interpret-markup layout props #{
  \markup { \override #'(font-name . DejaVu Sans) $arg }
#}))

\markup {
  \nfont Hallo
}
--snip--

If you are using pre-2.15 or want to do more fancy things with 
properties/overrides, you might try this: An override in a markup, 
modifies the properties for the markup to interpret. So a (cons alist 
props) can do the same:

--snip--
#(define-markup-command (xfont layout props arg)(markup?)
  (interpret-markup layout (cons '((font-name . DejaVu Sans)) props) 
arg)

)

\markup {
  \xfont Hallo
}
--snip--

HTH
Cheers, Jan-Peter

On 25.04.2012 10:15, Urs Liska wrote:

Hello community,

I didn't find this in the manual: How can I translate \markup { 
\override #'(font-name . XY) Test } in a markup function?

I only found how to translate e.g. \markup \italic Test etc. to #:italic.

Best
Urs


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Access font-name in markup functions

2012-04-26 Thread James
Hello,

On 26 April 2012 21:11, Urs Liska li...@ursliska.de wrote:
 Hello Jan-Peter,

 thank you for this information.
 This is exactly what I needed!

 Can I find this in the docs? To get a better understanding ...

It's mentioned here at least

http://lilypond.org/doc/v2.15/Documentation/changes/index.html


James

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Access font-name in markup functions

2012-04-25 Thread Urs Liska

Hello community,

I didn't find this in the manual: How can I translate \markup { 
\override #'(font-name . XY) Test } in a markup function?

I only found how to translate e.g. \markup \italic Test etc. to #:italic.

Best
Urs
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Access font-name in markup functions

2012-04-25 Thread Jan-Peter Voigt

Hello Urs,

if you are using the current devel version, you can wrap any markup with 
#{ #}

--snip--
\version 2.15.37

#(define-markup-command (nfont layout props arg)(markup?)
  (interpret-markup layout props #{
  \markup { \override #'(font-name . DejaVu Sans) $arg }
#}))

\markup {
  \nfont Hallo
}
--snip--

If you are using pre-2.15 or want to do more fancy things with 
properties/overrides, you might try this: An override in a markup, 
modifies the properties for the markup to interpret. So a (cons alist 
props) can do the same:

--snip--
#(define-markup-command (xfont layout props arg)(markup?)
  (interpret-markup layout (cons '((font-name . DejaVu Sans)) props) arg)
)

\markup {
  \xfont Hallo
}
--snip--

HTH
Cheers, Jan-Peter

On 25.04.2012 10:15, Urs Liska wrote:

Hello community,

I didn't find this in the manual: How can I translate \markup { 
\override #'(font-name . XY) Test } in a markup function?

I only found how to translate e.g. \markup \italic Test etc. to #:italic.

Best
Urs


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user