Closed jperon closed 1 year ago
It gives the most interesting result... No errors (great!). But it changes a font to some I don't use for sure... Look into attached fragments. First as it was with Minion and second what shows after a change you made.
8bc13bab4bc1db70258b581f107eb559-1.pdf 5593b8589b544f4bc131f2fa57c3c8d3-1.pdf
May you please add this to your MWE:
\directlua{tex.sprint(font.getfont(font.current()).fullname)}
It only has added text "Minion Pro-Regular" at the beginning of document but the font in lyrics is at it was.
What’s weird here is that it seems to mean lyluatex passes the good font name, but LilyPond doesn’t find it. Are the files of Minion Pro installed on your system (for example, in Debian / Ubuntu, in /usr/share/fonts/
or $HOME/.local/share/fonts/
, or only in the folder of your document ?
We are talking about MacOSX 12 in my case. The font is installed for user.
/Users/XXX/Library/Fonts/MinionPro-Regular.otf
Before the change you did in lyluatex.lua the font was visible for fontspec package. But it was necessary to invoke it before and besides polyglossia. Now in all cases lily pond sets the lyrics with font I don't use in tex document.
Could you please:
tmp-ly/
directory;@tomaszgrabowskiop I’ve just pushed a commit (on this branch) that should IMO fix the problem. The error came from the difference between fullname
(e. g. Minion Pro-Regular) and family name
(e. g. Minion Pro). The font with which I work (libertine
) returns the same value for both, so I hadn’t noted this difference!
It does the trick. Thank you!
Even when polyglossia is turned on and fontspec is not load separately.
But... ligatures (Rare) do not appear in the text of lyrics. I use both gregoriotex (and in lyrics are all old ligatures) and lilypond (no ligatures). Can it be fixed on your site or it is a different subject? I don't recall if there were present before problems with polyglossia...
I think this point is on LilyPond side: lyluatex
only defines fonts thanks to make-pango-font-tree, LilyPond (and not LaTeX) formats the lyrics.
This commit (up to current master) breaks pass-fonts for me.
If I use
\setmainfont{EB Garamond}
then in the created temporary .ly file, we get a font tree looking like:
(make-pango-font-tree "EB Garamond Regular" [etc]
the "Regular" part of which should not be there: LilyPond finds the EB Garamond only without the "Regular" specification.
@lfm83 OK, I see the problem. I’m going to fix it, but there will be a drawback: it will only work with EB Garamond
without polyglossia
, or at least only by loading polyglossia
after using setmainfont
. The reason is that polyglossia
removes the rawdata
table from the font table from luatex
, thus making it impossible to properly get the family name
of the current font.
@lfm83 Should be fixed in latest master.
@lfm83 Should be fixed in latest master.
Yes, I can confirm the bug is fixed for me. Thank you!
Fix #297