Am 18.01.2018 um 17:05 schrieb Werner LEMBERG:
When in the .tex file I write
\setmainfont{Adobe Garamond Pro}
the font is correctly used, but the "fullname" I get out of the Lua
object is "AGaramondPro-Regular".
This looks like the PostScript name.
Indeed, but it's the output of the "name" property in Lua's font object.
But the output of the same property for LInux Libertine is "Linux
Libertine O"
This is also what is shown in the properties of the PDF, but with
different entries for the different font weights.
the "name" of the Lua font object is
"AdobeGaramondPro:mode=node;script=latn;language=DFLT;+tlig;"
This looks like it could be massaged to "Adobe Garamond Pro", but
I'm really not sure this is the way to go.
[I'm not a luatex user.] This appears to be name ID 1 taken from the
font's `name' table, with spaces removed. I strongly suggest that you
get confirmation on a luatex list or forum.
Look also at the output of `fc-list -v', entries `family'
vs. `fullname'.
fc-list -v | grep Libertine
family: "Linux Libertine O"(s)
fullname: "Linux Libertine O"(s)
postscriptname: "LinLibertineO"(s)
...
fc-list -v | grep -i "adobe.*garamond"
family: "Adobe Garamond Pro"(s)
fullname: "AGaramondPro-SemiboldItalic"(s) "Adobe Garamond Pro Sb
Italic"(s) "Adobe Garamond Pro Semibold Italic"(s)
<no postscriptname!>
...
This seems I need the "family" value, which seems what LilyPond expects
(and which seems reasonable for user input).
Somehow it seems random that "fullname" is the right thing for LInux
Libertine and some other fonts.
Is *that* approach of CamelCasing a general rule? What about Fonts
that have CamelCase in their actual name? What about fonts that
Have consecutive capitals in their name?
There is certainly no magic here. Those camel casing is already
present in the font (or it happens as soon as spaces get removed).
What I meant is: can I safely assume that by inserting a space before
every uppercase letter I get back to the family name? I strongly doubt
that ...
Is there any reliable way to get the name to be used for LilyPond
out of LuaLaTeX?
I'm very confident that this is possible, since luatex parses the font
tables by itself.
I hope so, although the relevant section in the LuaTeX manual doesn't
give a hint.
Again a question for a luatex list...
I'll try to find one ...
Best
Urs
Werner
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user