lilypond-user
[Top][All Lists]
Advanced

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

Re: How to determine if a font is a fallback font?


From: Urs Liska
Subject: Re: How to determine if a font is a fallback font?
Date: Tue, 28 Apr 2015 11:07:10 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.6.0



Am 28.04.2015 um 10:55 schrieb Alexander Kobel:
On 2015-04-28 10:16, Urs Liska wrote:
Am 28.04.2015 um 10:12 schrieb Thomas Morley:
2015-04-28 9:48 GMT+02:00 Urs Liska <address@hidden>:
Am 28.04.2015 um 09:38 schrieb Werner LEMBERG:

For TTFs and TTCs (either with TrueType outlines or embedded CFFs) you
can use `ly:ttf-ps-name'.
 [...]
Again, on an outdated Ubuntu.

But that shouldn't make a difference. At least we can't accept that it
makes a difference.

What is the result of ly:ttf-ps-name when you pass it the full path to a
real emmentaler file (I can't see where they are on your system of course)?

Hi,

FWIW attached are the results on an up-to-date Arch.
I'm not surprised that the Emmentaler is not found; it is not in the default search path.

Hm, on my system (up-to-date Debian stable)

#(display (ly:font-config-get-font-file "Emmentaler-13"))
-> /home/uliska/git/lilypond/lilypond-builds/current/out/share/lilypond/current/fonts/otf/emmentaler-13.otf


    And this works with any of the LilyPond installation (means: I
    haven't done anything to add the directories to fontconfig's search
    path.

These differing reports look strange to me, and I'm not happy with it.
What I need is a function that returns the full path to a font file (retrieved from its font name) or #f if that font isn't present in the system.
This makes it possible to let fonts fall back to Emmentaler or the default text fonts, print a warning and avoid aborting the compilation with a file-not-found error.

Urs

ttf-ps-name works (as Werner suspected) also for the Alegreya-OTF; but neither the DejaVu TTF nor any other font seems to be found via ly:font-config-get-font-file. BTW, appending a design size does not help.


Best,
Alexander


reply via email to

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