[luatex] First question: Retrieve *family* name of a font / the three main families

lists at openlilylib.org lists at openlilylib.org
Sun Jan 21 12:53:08 CET 2018


21. Januar 2018 08:00, "Werner LEMBERG" <wl at gnu.org> schrieb:

>> Of course, but that's beside the point as of course you *can* use
>> any font in LilyPond. But there are no finer options such as
>> detailed implicit selection of font weights, optical sizes (although
>> it does so for notation font!), openType features.
> 
> The last one is not correct. It *can* select openType features (since
> July 2017).

OK, I have to apologize, this has slipped my attention.

> 
> To summarize: LilyPond is using the pango library for selecting
> fonts. What's needed is a `converter' for font names from pango to
> luatex and vice versa.
> 
> Blaming lilypond is actually barking the wrong tree. Pango itself
> uses the fontconfig library to extract font properties, and it would
> be a very useful thing if luatex could understand and handle
> fontconfig data in general. There are certainly far more programs
> that link to pango than programs that use luatex for text
> formatting...

I can't fully comment on that but it sounds reasonable.

> 
>> But even worse, there's really no useful paragraph formatting.
>> Paragraphs are as ugly as when you disable hyphenation in
>> LibreOffice.
> 
> This was the reason that in the beginning of development LilyPond used
> LaTeX as the typsetting backend (and it produced a DVI file, BTW).
> However, this was not a working solution for various reason, thus the
> change from LaTeX to pango.
> 
> I think that LilyPond should not become a `lilyTeX' program. Let's
> LilyPond do what it can best, namely typesetting music, and
> typesetting of larger text blocks should be done by specialized
> programs like luatex. As a consequence, there exists the `lyluatex'
> package as an interface between the two worlds, and thus is it is
> important to make the font name `conversion' as smooth as possible.
> 

To clarify (for others who may not have followed everything too closely), `lyluatex' is the reason we are talking here right now.

For actual text *blocks* it is true, and we could/should try to make Jan-Peter's snippet https://github.com/openlilylib/snippets/tree/master/specific-solutions/xelatex-markup-list more manageable. (Basically that would be the opposite of lyluatex: including segments of LaTeX in LilyPond documents.
However, I think for use cases like music theatre where you have lots of short texts that may not even be real blocks it seems like overkill to invoke LaTeX every time.

At least having hyphenation available would alleviate the most pressing concerns (https://sourceforge.net/p/testlilyissues/issues/5017/ without any follow-up ...)

Urs

> Werner



More information about the luatex mailing list