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: Alexander Kobel
Subject: Re: How to determine if a font is a fallback font?
Date: Tue, 28 Apr 2015 13:36:23 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0

On 2015-04-28 12:18, Werner LEMBERG wrote:
On my openSuSE GNU/Linux box, I get different results.

Given font name: Emmentaler-13
Determined font file: /usr/share/fonts/TTF/mplus-1c-medium.ttf
Actual font in that file: mplus-1c-medium
Given font is present: #f

   Given font name: Emmentaler-13
   Determined font file: 
/usr/local/share/lilypond/2.19.16/fonts/otf/emmentaler-13.otf
   Actual font in that file: Emmentaler-13
   Given font is present: 
#t/usr/local/share/lilypond/2.19.16/fonts/otf/emmentaler-13.otf
   Emmentaler-13

Given font name: Alegreya
Determined font file: /usr/share/fonts/TTF/mplus-1c-medium.ttf
Actual font in that file: mplus-1c-medium
Given font is present: #f

   Given font name: Alegreya
   Determined font file: /usr/share/fonts/truetype/Alegreya-Regular.ttf
   Actual font in that file: Alegreya-Regular
   Given font is present: #f/usr/share/fonts/truetype/Alegreya-Regular.ttf
   Alegreya-Regular

Note that `ly:ttf-ps-name' returns the font's *PostScript* name.  This
is *not* what fontconfig normally operates on (but see below).

I see. It's the same situation when I ask for "Alegreya-Regular" or "DejaVuSans", though. No change at all.
Also, I wonder why M+ is offered in my case; because of

address@hidden ~/test % fc-match FOOBAR
DejaVuSans.ttf: "DejaVu Sans" "Book"
address@hidden ~/test % fc-list --version
fontconfig version 2.11.1

BTW, on my Debian stable, I get:

~/test % fc-match FOOBAR
Vera.ttf: "Bitstream Vera Sans" "Roman"
~/test % fc-list --version
fontconfig version 2.9.0

while the test.ly offers KanjiStrokeOrders as a substitute for what it cannot find.

Since FontConfig version 2.11 (released October 2013), however, it is
possible to search for PostScript names also.  Example:

   $ fc-match "Alegreya"
   Alegreya-Regular.ttf: "Alegreya" "Regular"

   $ fc-match "AlegreyaRegular"
   arial.ttf: "Arial" "Normal"

   $ fc-match ":postscriptname=AlegreyaRegular"
   Alegreya-Regular.ttf: "Alegreya" "Regular"

Ditto (on Arch, with FC 2.11.1).


Alexander



reply via email to

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