lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Font names convention


From: Urs Liska
Subject: Re: Font names convention
Date: Thu, 18 Jan 2018 22:06:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2



Am 18.01.2018 um 17:52 schrieb Shane Brandes:
Fonts are slightly weird

Indeed, I had that experience before (for example when trying to make LilyPond load fonts installed as system fonts. This failed because fontconfig *always* returns (at least it did so when I was trying) *some* font when the requested font isn't available. This made it impossible to detect if the desired font (e.g. lilyJAZZ) is present or not. Instead LilyPond would then use *any* random font instead of allowing me to fall back to Emmentaler ...


and are encoded  with both a name, with or
without a style subset name, and a human readable name which can be
irritatingly different from the actual name. There can be no spaces in
the names which is why the difference in Human readable and the
programming name. As far as camel case it will make a font that is
entirely different in being requested to one in all caps or all lower
case of the same letters. Anyway, it really can prove a headache in
some cases. The most accurate method I can recommend for examining
this stuff is using Fontforge which is probably a bit much power just
to check on such things.

Just to be clear: with FontForge I can inspect individual fonts isn't it? Or are you suggesting some other tool I could use from that? The problem is that I want to catch *any* font a user may have selected in a LuaTeX file and send its (family) name to LilyPond.

Urs



regards,

Shane

On Thu, Jan 18, 2018 at 11:05 AM, Werner LEMBERG <address@hidden> wrote:
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.

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'.

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).

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.  Again a question for a luatex list...


     Werner
_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user




reply via email to

[Prev in Thread] Current Thread [Next in Thread]