lilypond-user
[Top][All Lists]
Advanced

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

Re: Use TTF font for text in working directory?


From: Werner LEMBERG
Subject: Re: Use TTF font for text in working directory?
Date: Mon, 07 Dec 2020 09:43:35 +0100 (CET)

> 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).


    Werner



reply via email to

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