Open edonv opened 2 weeks ago
You have found a subtile but nasty bug in the SVG renderer that ChordPro uses. I will fix that for the next version.
In the mean time, you can try the following workaround:
-- config file:
pdf.fontconfig.sansbolditalic {
"" : Helvetica-BoldOblique
bold : Helvetica-BoldOblique
italic : Helvetica-BoldOblique
bolditalic : Helvetica-BoldOblique
}
and in the LilyPond fragment:
\context {
\ChordNames
\override ChordName.font-name = "sansbolditalic"
}
}
That workaround worked! Thanks!
Describe the bug
I'm trying to use an italic font for chord names in an embedded Lilypond section, so it can mirror the rest of my ChordPro file, but I can't get it to render italics, no matter what font. I've tested with multiple fonts, and though different font weights work, italics in any of the fonts is either ignored or causes it to reject the font altogether.
I've also tested the exact same Lilypond content (with the intended font) directly through
lilypond
CLI and italics work without issue. I even tested this with the temp.ly
file ChordPro creates to embed the section, and it works without issue.Additionally, embedded Lilypond actually does read the font from the ChordPro config
pdf.fontconfig
(in this case I'm usingsans
), but it still won't take the italic version.To Reproduce
I've tested:
font-name
, which overrides font family, weight, slant, etc.sans
fontfont-family
, paired withfont-series = #'bold
andfont-shape = #'italic
.Lilypond formatting (setting font name directly)
Lilypond formatting (setting font family)
Lilypond content:
Attachments
Lilypond directly:
Embedded in ChordPro file:
System information
Additional Notes
Looks like the tablature font is different, but that's not a big deal, I actually am very happy with the font that ChordPro provides for Lilypond's tablature.