lilypond-user
[Top][All Lists]
Advanced

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

Re: Feedback on lilypondblog article


From: Urs Liska
Subject: Re: Feedback on lilypondblog article
Date: Wed, 15 Apr 2015 20:04:16 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.6.0



Am 15.04.2015 um 18:55 schrieb Noeck:
Hi Urs and Abraham,

thanks for your replies. I already assumed that this is mostly not new
to you, but I didn't know which parts of it.

...


3. If I have a font in my LP installation … I can not use it
automatically with the library – I have to add a file in the stylesheets
Are you talking of fonts that are available from fonts.openlilylib.org?
No (see below), about a custom font.

If yes, this is either a bug or (hopefully) you don't have the latest version 
of openLilyLib checked out. All fonts from the official repository should have 
a default (even if empty) stylesheet present.
Yes, that's true, that works as all stylesheets are present.

Apart from that there _is_ a fallback solution: You can write
\useNotationFont \with {
   style = none
} Beethoven

to skip the inclusion of the default stylesheet.
This is described in more detail in the (pending) second post.
That's ok, but I would argue that this is too complicated if
\useNotationFont MyFont
could also work out-of-the box.

Yes, I wouldn't have thought of that possibility. Of course the function should fallback to not trying to include a stylesheet then.


If there is a real chance that one day people use alternative fonts that are 
_not_ part of fonts.openlilylib.org we should of course add a default fallback 
solution.
Yes there is! Abraham was so kind to produce me a variant of Emmentaler
with a more Cadence-like clef. But also in general I think it should
work for any font present in the lilypond folder.


...


6. The font install script could accept several destination paths to
install fonts in a list of lilypond directories (like
lilypond-2*/lilypond). That's something I could do, should I?
Yes, this is already on my wishlist.
But I'm not sure if I understand you correctly: you can already pass a list of 
directories to handle multiple installations at once. And you can pass a file 
containing such a list.
What you can't do yet is to use wild card search, which probably is what you 
mean.

I see two ways to integrate this:
a)
interpret a directory that ends with an asterisk by iterating over all 
subdirectories.
b)
create a dedicated command line option that treats the given target directory 
as a root whose children should be searched (could still have the asterisk wild 
card).

Maybe b) is slightly easier to implement because currently the script aborts when a 
target isn't a lilypond installation. But when using an "all subdirectories" 
option any directories that don't contain a lily installation should silently be skipped. 
An error should only be raised when no installation is found at all.
I prefer option c) letting the shell expand the expression and accept a
list of directories (I don't know how the expansion works in Windows,
though).

Hm, did you try it out?
Actually you can pass a list of directories to the script, and if shell expansion would work the script should recognize it. What should probably be modified is the handling of invalid targets (as they can occur much more easily with expanded paths). Contrary to the current "instant failure" the script should simply ignore invalid targets (maybe with a log message) and only raise an error if no valid target has been identified at all.


More comments on this script:
What is the minimum python version you want to support?
A help message (-h) would be nice -> how about using argparse? (Not
necessary for this low amount of options though.)

Huh?

python install-lily-fonts -h
usage: install-lily-fonts [options]

Install extra fonts for LilyPond from http://fonts.openlilylib.org

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -d FONT_DIRECTORY, --font-directory FONT_DIRECTORY
Root directory where all fonts are stored. Defaults to
                        the current working directory.
  -t TARGETS [TARGETS ...], --targets TARGETS [TARGETS ...]
                        Path (absolute or relative to current working
                        directory) LilyPond executable. If not given some
                        attempts are done to determine it automatically.
  -b, --batch           Run in batch mode. This means: - In case of doubts
don't ask but abort the script - Don't ask for choices but install/update all found fonts - Quietly overwrite
                        existing files
  -f, --force           Don't try to determine updated fonts, overwrite
                        everything with upstream files.
  -l, --local           Consider the local font catalog up to date, don't
download the remote one. Useful for updating multiple
                        LilyPond installations.
  -i, --init            Initialize a new local font repository. Do not
                        consider a missing catalog file an error.

Best
Urs



reply via email to

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