Titles italic format ignored

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

Titles italic format ignored

Marco Bagolin

Hello all,

If I write:

\version “2.18.2”

...

\header {

                title = \markup \override #'(font-name . "Arial Black") \fontsize #+3 { \bold  "TITLE" }

                subtitle = \markup \raise #1.0 \fontsize #-3 { \italic { "A Medley for Orchestra" \null}}

…}

 

Output is :

TITLE

A Medley for Orchestra

 

But if I write this:

 

\header {

                title = \markup \override #'(font-name . "Arial Black") \fontsize #+3 { \bold  "TITLE" }

                subtitle = \markup \raise #1.0 \fontsize #-3 \override #'(font-name . "Arial") { \italic { "A Medley for Orchestra" \null}}

…}

 

Output is :

 

TITLE

A Medley for Orchestra

 

Why “italic” format is ignored ?

I tried to write \override #'(font-name . "Arial") in every position of subtitle string, but result are the same…

I can’t find my mistake.

Someone can help me?


Thank you in advance 

 

 

 

 

ˑ
Reply | Threaded
Open this post in threaded view
|

Re: Titles italic format ignored

Aaron Hill
On 2020-02-13 11:22 pm, Marco Bagolin wrote:
> Why “italic” format is ignored ?

Because you effectively told LilyPond to ignore it.  font-name trumps
font-family, font-series and font-shape.

Please review this post for more details:

https://lists.gnu.org/archive/html/lilypond-user/2019-01/msg00723.html


-- Aaron Hill

Reply | Threaded
Open this post in threaded view
|

Re: Titles italic format ignored

Curt McDowell-2
In reply to this post by Marco Bagolin

Overriding font-name also overrides the font slant and weight in a sticky way. Perhaps LilyPond ought to have a font-face property. The slant and weight can be specified along with the font name:

  subtitle = \markup \raise #1.0 \fontsize #-3 \override #'(font-name . "Arial Italic") "A Medley for Orchestra"

or

  subtitle = \markup \raise #1.0 \fontsize #-3 \override #'(font-name . "Arial Black Italic") "A Medley for Orchestra"

Regards,
Curt McDowell

Reply | Threaded
Open this post in threaded view
|

Re: Titles italic format ignored

Kieren MacMillan
Hi Curt,

> Overriding font-name also overrides the font slant and weight in a sticky way. Perhaps LilyPond ought to have a font-face property.

You can override the entire font family, and then just use \italic, \bold, etc. as expected.
Search the archives for Abraham’s posts on how.

Hope that helps,
Kieren.
________________________________

Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Titles italic format ignored

Noeck
In reply to this post by Marco Bagolin
Hi,

as others said, font-name overwrites all of font-family, font-series and
font-shape. You can set the font family like this:

\version "2.19.84"

\paper {
  % define a font ‘arial’ from the font called ‘Arial’
  #(add-pango-fonts fonts 'arial "Arial"
    (/ (* staff-height pt) 2.5))
}

% use the font family ‘arial’ in your markup or header markup
\markup \override #'(font-family . arial) \line {
  \bold "Bold" \italic "italic" "regular"
}

HTH
Joram

Reply | Threaded
Open this post in threaded view
|

Re: Titles italic format ignored

Marco Bagolin
Thank you all.

Il giorno ven 14 feb 2020 alle 15:44 Noeck <[hidden email]> ha scritto:
Hi,

as others said, font-name overwrites all of font-family, font-series and
font-shape. You can set the font family like this:

\version "2.19.84"

\paper {
  % define a font ‘arial’ from the font called ‘Arial’
  #(add-pango-fonts fonts 'arial "Arial"
    (/ (* staff-height pt) 2.5))
}

% use the font family ‘arial’ in your markup or header markup
\markup \override #'(font-family . arial) \line {
  \bold "Bold" \italic "italic" "regular"
}

HTH
Joram