Hi Joram,
I'm not an expert in the topic, but I hope I can still shed some light
on the issue. AFAIU this depends on how the font is shipped, and I am
not aware of a proper fallback solution that will work in all cases.
If the designer ships all fonts of a family (probably in a single .otf
or .ttf file) with the same font basename, the first approach will work:
It is really /one/ font in several shapes/variants. However, if she
ships each style with a different name (postfixed by, e.g., "Italic" or
"Bold" or "SmallCaps"), you have to resort to the second option.
I assume there are technical reasons to do the latter approach instead
of font collections; e.g., IIRC Type1 fonts in the traditional format
can only contain a single font style per file. Also, separate files can
help to make name clashes more visible: if you have a single font style
and at some point upgrade to the entire family, you won't have two
versions of the regular one coexisting silently. Finally, I'm not sure
if there are specifications for all common style variants in all
supported container formats.
There are some fonts available in both variants, that is both in
collections and in separate files. I'm not aware of a method to specify
fallbacks in LilyPond, short from re-inventing the font selection
through Scheme.
IIUC, the clean way is to always use your first approach and provide
FontConfig config files which translate between this representation and
the "internal" naming. The second part should usually be done by the
font provider, or your Linux distribution. No clue about the situation
on Windows... I'm not sure how applications like OpenOffice deal
ambiguities, in particular since OO allows fake bold, italics or small
caps, but will choose "real" designs if existing. (I assume it's a
rather simple heuristic.) More ambitious software (such as Scribus) does
not pretend fancy faces if they are not explicitly designed and shipped;
LilyPond follows this good tradition.
Best,
Alexander
On 01/06/2014 08:24 PM, Noeck wrote:
Hi,
why does this example code not work? I.e. why does it not print the clef
modifier 8 in the italic version of the Century Schoolbook font?
\version "2.18.0"
\score {
{ \clef "treble_8" a1^"8 is not italic" }
\layout {
\override Staff.ClefModifier.font-name = #"Century Schoolbook L"
\override Staff.ClefModifier.font-shape = #'italic
}
}
This works, but for other fonts the font-shape can be changed without
changing the name.
\score {
{ \clef "treble_8" a1^"8 is italic" }
\layout {
\override Staff.ClefModifier.font-name = #"Century Schoolbook L italic"
}
}
TIA,
Joram
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user