[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to determine if a font is a fallback font?
From: |
Werner LEMBERG |
Subject: |
Re: How to determine if a font is a fallback font? |
Date: |
Tue, 28 Apr 2015 12:18:27 +0200 (CEST) |
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).
> Given font name: DejaVu Sans
> Determined font file: /usr/share/fonts/TTF/mplus-1c-medium.ttf
> Actual font in that file: mplus-1c-medium
> Given font is present: #f/usr/share/fonts/TTF/mplus-1c-medium.ttf
> mplus-1c-medium
Given font name: DejaVu Sans
Determined font file: /usr/share/fonts/truetype/DejaVuSans.ttf
Actual font in that file: DejaVuSans
Given font is present: #f/usr/share/fonts/truetype/DejaVuSans.ttf
DejaVuSans
Same as above: `DejaVuSans' != `DejaVu Sans'.
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"
Maybe lilypond's `display_fontset' function (in font-config-scheme.cc)
can be extended to display PS names also. And perhaps it makes sense
to extend lilypond's font loading function to accept a font's PS name
– or to provide a Scheme function wrapper for FontConfig to access a
given font's PS name.
Werner
- Re: How to determine if a font is a fallback font?, (continued)
- Re: How to determine if a font is a fallback font?, Urs Liska, 2015/04/28
- Re: How to determine if a font is a fallback font?, Thomas Morley, 2015/04/28
- Re: How to determine if a font is a fallback font?, Urs Liska, 2015/04/28
- Re: How to determine if a font is a fallback font?, Werner LEMBERG, 2015/04/28
- Re: How to determine if a font is a fallback font?, Alexander Kobel, 2015/04/28
- Re: How to determine if a font is a fallback font?, Werner LEMBERG, 2015/04/28
- Re: How to determine if a font is a fallback font?, Urs Liska, 2015/04/28
- Re: How to determine if a font is a fallback font?, Alexander Kobel, 2015/04/28
- Re: How to determine if a font is a fallback font?, Alexander Kobel, 2015/04/28
- Re: How to determine if a font is a fallback font?, Urs Liska, 2015/04/28
- Re: How to determine if a font is a fallback font?,
Werner LEMBERG <=
- Re: How to determine if a font is a fallback font?, Alexander Kobel, 2015/04/28
- Re: How to determine if a font is a fallback font?, Urs Liska, 2015/04/28
- Re: How to determine if a font is a fallback font?, Urs Liska, 2015/04/28
- Re: How to determine if a font is a fallback font?, Urs Liska, 2015/04/28
- Re: How to determine if a font is a fallback font?, Urs Liska, 2015/04/28
- Re: How to determine if a font is a fallback font?, Urs Liska, 2015/04/28
- Re: How to determine if a font is a fallback font?, David Nalesnik, 2015/04/28
- Re: How to determine if a font is a fallback font?, Urs Liska, 2015/04/28
- Re: How to determine if a font is a fallback font?, David Nalesnik, 2015/04/28
- Re: How to determine if a font is a fallback font?, Urs Liska, 2015/04/29