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 <u...@openlilylib.org>:
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. 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
/usr/share/fonts/OTF/Alegreya-Regular.otf: Alegreya:style=Regular
/usr/share/fonts/TTF/DejaVuSans.ttf: DejaVu Sans:style=Book
# nope, no Emmentaler in here...
\version "2.19.18"

fontExists =
#(define-void-function (parser location font-name)(string?)
   (let* ((font-file (ly:font-config-get-font-file font-name))
          (reverse-font-name (ly:ttf-ps-name font-file))
          (font-exists (string=? font-name reverse-font-name)))
     (ly:message (format "\nGiven font name: ~a" font-name))
     (ly:message (format "Determined font file: ~a" font-file))
     (ly:message (format "Actual font in that file: ~a" reverse-font-name))
     (ly:message (format "Given font is present: ~a" font-exists))))

\fontExists "Emmentaler-13"
#(display (ly:font-config-get-font-file "Emmentaler-13"))
#(newline)
#(display (ly:ttf-ps-name (ly:font-config-get-font-file "Emmentaler-13")))
#(newline)
#(newline)

\fontExists "Alegreya"
#(display (ly:font-config-get-font-file "Alegreya"))
#(newline)
#(display (ly:ttf-ps-name (ly:font-config-get-font-file "Alegreya")))
#(newline)
#(display (ly:ttf-ps-name "/usr/share/fonts/OTF/Alegreya-Regular.otf"))

\fontExists "DejaVu Sans"
#(display (ly:font-config-get-font-file "DejaVu Sans"))
#(newline)
#(display (ly:ttf-ps-name (ly:font-config-get-font-file "DejaVu Sans")))
#(newline)
#(display (ly:ttf-ps-name "/usr/share/fonts/TTF/DejaVuSans.ttf"))
GNU LilyPond 2.19.18
Processing `test.ly'
Parsing...

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: 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: 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

/usr/share/fonts/TTF/mplus-1c-medium.ttf
mplus-1c-medium
Alegreya-Regular/usr/share/fonts/TTF/mplus-1c-medium.ttf
mplus-1c-medium
DejaVuSans
Success: compilation successfully completed
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to