9

I'm trying to produce a music sheet with chords and lyrics only, using lilypond. However, some parts of the words seem to disappear. Here is a complete example.

\layout {
  indent = 0                                                                                                                                                 
  ragged-right = ##t
}

\new Score \with {
  \remove "Bar_number_engraver"
}
<<
   \chords { s8 c8 s4 g s a:m s f8:maj7 s f:6 s }
   \new Lyrics
    \with {
        \override VerticalAxisGroup.staff-affinity = ##f
        \override LyricText.parent-alignment-X = #LEFT
        \override LyricText.self-alignment-X = #LEFT
        }
   \lyricmode {
        "When I"8 find "myself in"4 times "of trouble" \break
        Mother Mary  "comes to me"4}
>>

In this case, the word "find" ends up being truncated as "nd". This seem to happen whenever the letters "fi" appear. Why is that happening? How can I get the full word? Syllable fi disappearing in lilypond lyrics

Edit: I noticed the error issued by pdflatex:

pdfTeX warning: pdflatex (file /usr/local/texlive/2020/texmf-dist/fonts/type1/public/tex-gyre/qcsr.pfb): glyph `f_i' undefined
4
  • 2
    The pair of characters fi is sometimes misread as a single character. This often happens e.g. when you copy text from a pdf. This single character is somehow problematic, so it may disappear in some cases. (This comment is not specific to the software you use or anything, so it is not an answer.) Commented Mar 17, 2022 at 13:49
  • Related to @RichardHardy 's comment: on MacOS, I discovered that the OS "helpfully" defaults to "smart quotes" in all apps. That led to mysterious error messages when trying to compile .ly files until I noticed what was happening. I had to dive into some advanced settings in one of the Settings subsections to turn that execrably bad default off. For all I know, your system is doing the same thing to your input "fi" character pair. Commented Mar 18, 2022 at 14:09
  • 3
    @RichardHardy my guess is that lilypond (or someone else somewhere along the line) is converting the two characters fi to the single character (Unicode character FB01 in hexadecimal, which is 64257 in decimal), and that the font in use doesn't support that character.
    – phoog
    Commented Mar 18, 2022 at 14:22
  • @phoog, exactly! Thanks for the details which I was not aware of. Commented Mar 18, 2022 at 14:38

2 Answers 2

11

That looks like a problem with your font installation affecting the "fi" ligature. LilyPond usually uses Pango/FreeType/Harfbuzz for rendering its output. Font problems are very platform-specific, so it would help to know what platform and what version of LilyPond you are actually using. You may get the best answer by submitting to the bug reporting list of LilyPond itself.

3
  • Thanks! the software version is: lilypond-book (GNU LilyPond) 2.22.1 I'm running it on macOS Monterey. I installed lilypond through homebrew.
    – Antonius
    Commented Mar 17, 2022 at 1:30
  • 3
    One way to confirm that it's related to ligatures in the font might be to try lyrics with some of the other common ligatures like ff fl ffi ffl ft.
    – Theodore
    Commented Mar 18, 2022 at 13:43
  • @Antonius what font is that? Does it support character FB01/64257?
    – phoog
    Commented Mar 18, 2022 at 14:26
2

Since the problem seemed to be tied to pdflatex, I managed to fix it by changing the workflow and using latex together with dvipdf.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.