|
From: | Abraham Lee |
Subject: | Re: how to get markup formatting to survive a font-name change |
Date: | Wed, 19 Apr 2017 21:42:07 -0600 |
On Wed, Apr 19, 2017 at 8:03 PM Kieren MacMillan <address@hidden> wrote: Hello all,
In the snippet, below, the font-name override kills the \italic as set in the \header.
Is there any way to avoid that [without having to hack the title into two separate functions/parameters]?
Thanks,
Kieren.
%%% SNIPPET BEGINS
\version "2.19.59"
\paper {
bookTitleMarkup = ##f
scoreTitleMarkup = \markup {
\override #'(font-name . "Minion Pro")
\fromproperty #'header:title
}
}
\header {
title = \markup { "SATB chorus" \italic "a cappella" }
}
\new Devnull s1
%%% SNIPPET ENDSThe reason it breaks the \italic is because you don't tell LilyPond that there _is_ an italic variant when all you do is override the font-name like that.The better way would be to add a text font to the "fonts" tree because it looks for the four standard family members (regular, italic, bold, and bold-italic). I think the scheme function is "add-text-fonts". You can find how it's used in the file [LILYDIR]/scm/font.scm.With the font family added (let's say it's the 'minion family), you the change to it with\markup {\override #'(font-family . 'minion)...}And if Pangolin found the italic variant, you shouldn't need to do anything else other than \italic like normal.
[Prev in Thread] | Current Thread | [Next in Thread] |