change the font for all markups

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

change the font for all markups

Ole Schmidt
Hi,

What is the way to change the font of all markups into the \typewriter font?
I've tried what is suggested in the manual:

 (#(define fonts
    (make-pango-font-tree "Times New Roman"
                          "Nimbus Sans"
                          "Luxi Mono"
                          (/ staff-height pt 20)))

the markups font did not change.



thanks,

ole







_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: change the font for all markups

Noeck
Hi,

this works for me (taken from Frescobaldi Insert > Document fonts …):

\paper {
  fonts = #
  (make-pango-font-tree
    "Times New Roman"
    "Nimbus Sans"
    "Luxi Mono"
   (/ (* staff-height pt) 2.5))
}
{ a^\markup { "Test" \typewriter "code" } }

Of course, the fonts must be installed.

HTH,
Joram

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: change the font for all markups

Noeck
Hi Ole,

by the way: your example also works for me if you omit the first parenthesis:
#(define fonts
instead of
(#(define fonts

>  (#(define fonts
>     (make-pango-font-tree "Times New Roman"
>                           "Nimbus Sans"
>                           "Luxi Mono"
>                           (/ staff-height pt 20)))

Cheers,
Joram

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: change the font for all markups

Ole Schmidt
In reply to this post by Noeck
Am 12.02.2015 um 12:04 schrieb Noeck <[hidden email]>:

> Hi,
>
> this works for me (taken from Frescobaldi Insert > Document fonts …):
>
> \paper {
>  fonts = #
>  (make-pango-font-tree
>    "Times New Roman"
>    "Nimbus Sans"
>    "Luxi Mono"
>   (/ (* staff-height pt) 2.5))
> }
> { a^\markup { "Test" \typewriter "code" } }
>
> Of course, the fonts must be installed.
>
> HTH,
> Joram
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user


Thanks, but I'am looking for a solution where the \typewriter in the markup is not neccecary.
I have lots of markups and don't want to change them all manually.


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: change the font for all markups

Richard Shann-2
On Thu, 2015-02-12 at 12:20 +0100, Ole Schmidt wrote:

> Am 12.02.2015 um 12:04 schrieb Noeck <[hidden email]>:
>
> > Hi,
> >
> > this works for me (taken from Frescobaldi Insert > Document fonts …):
> >
> > \paper {
> >  fonts = #
> >  (make-pango-font-tree
> >    "Times New Roman"
> >    "Nimbus Sans"
> >    "Luxi Mono"
> >   (/ (* staff-height pt) 2.5))
> > }
> > { a^\markup { "Test" \typewriter "code" } }
> >
> > Of course, the fonts must be installed.

replace "Times New Roman" with "Luxi Mono" or whatever typerwriter font
you have, the what would have been in Times will come out in Mono...

Richard


> >
> > HTH,
> > Joram
> >
> > _______________________________________________
> > lilypond-user mailing list
> > [hidden email]
> > https://lists.gnu.org/mailman/listinfo/lilypond-user
>
>
> Thanks, but I'am looking for a solution where the \typewriter in the markup is not neccecary.
> I have lots of markups and don't want to change them all manually.
>
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: change the font for all markups

Noeck
In reply to this post by Ole Schmidt
Hi Ole,

> Thanks, but I'am looking for a solution where the \typewriter in the markup is
not neccecary.
> I have lots of markups and don't want to change them all manually.

then I misunderstood your question. The three fonts in this command are
serif (default), sans-serif (\sans) and mono-space (\typewriter).
So this will set all fonts to the typewriter (note the change in the first font):

\paper {
  fonts = #
  (make-pango-font-tree
   "Ubuntu Mono"
   "Linux Biolinum O"
   "Ubuntu Mono"
   (/ (* staff-height pt) 2.5))
}

If you have Luxi Mono installed, it should work with it just the same (instead
of Ubuntu Mono).

HTH,
Joram


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: change the font for all markups

Ole Schmidt
In reply to this post by Richard Shann-2






Am 12.02.2015 um 11:50 schrieb Richard Shann <[hidden email]>:

> On Thu, 2015-02-12 at 12:20 +0100, Ole Schmidt wrote:
>> Am 12.02.2015 um 12:04 schrieb Noeck <[hidden email]>:
>>
>>> Hi,
>>>
>>> this works for me (taken from Frescobaldi Insert > Document fonts …):
>>>
>>> \paper {
>>> fonts = #
>>> (make-pango-font-tree
>>>   "Times New Roman"
>>>   "Nimbus Sans"
>>>   "Luxi Mono"
>>>  (/ (* staff-height pt) 2.5))
>>> }
>>> { a^\markup { "Test" \typewriter "code" } }
>>>
>>> Of course, the fonts must be installed.
>
> replace "Times New Roman" with "Luxi Mono" or whatever typerwriter font
> you have, the what would have been in Times will come out in Mono...
>
> Richard

that makes sense and works!

thanks!

>
>
>>>
>>> HTH,
>>> Joram
>>>
>>> _______________________________________________
>>> lilypond-user mailing list
>>> [hidden email]
>>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>>
>> Thanks, but I'am looking for a solution where the \typewriter in the markup is not neccecary.
>> I have lots of markups and don't want to change them all manually.
>>
>>
>> _______________________________________________
>> lilypond-user mailing list
>> [hidden email]
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
>


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: change the font for all markups

tisimst
Ole Schmidt wrote
Am 12.02.2015 um 11:50 schrieb Richard Shann <[hidden email]>:

> On Thu, 2015-02-12 at 12:20 +0100, Ole Schmidt wrote:
>> Am 12.02.2015 um 12:04 schrieb Noeck <[hidden email]>:
>>
>>> Hi,
>>>
>>> this works for me (taken from Frescobaldi Insert > Document fonts …):
>>>
>>> \paper {
>>> fonts = #
>>> (make-pango-font-tree
>>>   "Times New Roman"
>>>   "Nimbus Sans"
>>>   "Luxi Mono"
>>>  (/ (* staff-height pt) 2.5))
>>> }
>>> { a^\markup { "Test" \typewriter "code" } }
>>>
>>> Of course, the fonts must be installed.
>
> replace "Times New Roman" with "Luxi Mono" or whatever typerwriter font
> you have, the what would have been in Times will come out in Mono...
>
> Richard

that makes sense and works!

thanks!
>
>
>>>
>>> HTH,
>>> Joram
>>>
>>> _______________________________________________
>>> lilypond-user mailing list
>>> [hidden email]
>>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>>
>> Thanks, but I'am looking for a solution where the \typewriter in the markup is not neccecary.
>> I have lots of markups and don't want to change them all manually.
>>
>>
>> _______________________________________________
>> lilypond-user mailing list
>> [hidden email]
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
>


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Ole,

While it works, the effect is that the typewriter font becomes your MAIN font (since that is what LilyPond uses the \roman font-family for). If you are okay with that, great. If this is not desired, you can do:

  \override Score.TextScript.font-family = #'typewriter

This only affects \markups and other simple text.

HTH,
Abraham
Reply | Threaded
Open this post in threaded view
|

Re: change the font for all markups

Ole Schmidt-2

Am 12.02.2015 um 20:53 schrieb tisimst <[hidden email]>:

> Ole Schmidt wrote
>> Am 12.02.2015 um 11:50 schrieb Richard Shann &lt;
>
>> richard@.plus
>
>> &gt;:
>>
>>> On Thu, 2015-02-12 at 12:20 +0100, Ole Schmidt wrote:
>>>> Am 12.02.2015 um 12:04 schrieb Noeck &lt;
>
>> noeck.marburg@
>
>> &gt;:
>>>>
>>>>> Hi,
>>>>>
>>>>> this works for me (taken from Frescobaldi Insert > Document fonts …):
>>>>>
>>>>> \paper {
>>>>> fonts = #
>>>>> (make-pango-font-tree
>>>>>  "Times New Roman"
>>>>>  "Nimbus Sans"
>>>>>  "Luxi Mono"
>>>>> (/ (* staff-height pt) 2.5))
>>>>> }
>>>>> { a^\markup { "Test" \typewriter "code" } }
>>>>>
>>>>> Of course, the fonts must be installed.
>>>
>>> replace "Times New Roman" with "Luxi Mono" or whatever typerwriter font
>>> you have, the what would have been in Times will come out in Mono...
>>>
>>> Richard
>>
>> that makes sense and works!
>>
>> thanks!
>>>
>>>
>>>>>
>>>>> HTH,
>>>>> Joram
>>>>>
>>>>> _______________________________________________
>>>>> lilypond-user mailing list
>>>>>
>
>> lilypond-user@
>
>>>>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>>>
>>>>
>>>> Thanks, but I'am looking for a solution where the \typewriter in the
>>>> markup is not neccecary.
>>>> I have lots of markups and don't want to change them all manually.
>>>>
>>>>
>>>> _______________________________________________
>>>> lilypond-user mailing list
>>>>
>
>> lilypond-user@
>
>>>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>>
>>>
>>
>>
>> _______________________________________________
>> lilypond-user mailing list
>
>> lilypond-user@
>
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
> Ole,
>
> While it works, the effect is that the typewriter font becomes your MAIN
> font (since that is what LilyPond uses the \roman font-family for). If you
> are okay with that, great. If this is not desired, you can do:
>
>  \override Score.TextScript.font-family = #'typewriter
>
> This only affects \markups and other simple text.
>
> HTH,
> Abraham
>
>
Thanks for that!

ole
_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user