[Top][All Lists]

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

Re: Use TTF font for text in working directory?

From: Stefan Hante
Subject: Re: Use TTF font for text in working directory?
Date: Mon, 7 Dec 2020 21:08:18 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1

Hi Werner,

thank you for quick and precise answer. It worked just as you said.

I used this to build a small project to create a beginner ocarina songbook, where under each note the fingering for the ocarina is printed. The project is on Git:

Just in case anyone is looking for something similar.

Best, Stefan

Am 07.12.2020 um 09:43 schrieb Werner LEMBERG:
Is it somehow possible to tell Lilypond to look for the .ttf file in
the working directory, ie. the directory in which the .ly file is
that is being compiled?
Yes.  Here's some documentation from the current development version;
the two mentioned scheme functions, however, are present in 2.20, too.

   Finding fonts

   In addition to any font already installed on the operating system,
   more fonts may be added to the ones detected by FontConfig (and thus
   available in LilyPond scores) by the following commands:

     #(ly:font-config-add-font "path/to/font-file")
     #(ly:font-config-add-directory "path/to/directory/")

   Both commands accept either absolute or relative paths, which makes
   it possible to compile a score on any system by simply distributing
   the relevant font files together with the LilyPond input files.

For your case it should be thus sufficient to add

   #(ly:font-config-add-directory ".")

at the top of your main `.ly` file (assuming that you call the
`lilypond` binary while being in this directory).


reply via email to

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