lilypond-devel
[Top][All Lists]
Advanced

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

Re: Metafont optional parameters


From: Han-Wen Nienhuys
Subject: Re: Metafont optional parameters
Date: Sun, 31 May 2020 10:31:43 +0200

On Sun, May 31, 2020 at 12:41 AM Owen Lamb <owendlamb@gmail.com> wrote:
>
> Hi all,
>
> I'd like to add an optional parameter for smuflcode to fet_beginchar, so
> that I don't have to take two lines redeclaring the variable in every
> glyph. Ideally, it won't have to be optional once every character has it,
> but in the meantime, it would help with testing individual characters' new
> encodings.

> I wasn't able to find whether MF supports optional parameters, only that
> certain built-in functions have them. Does anyone with MF experience know
> if it does, and, if so, how to put one in?

I don't understand what you mean with  "two lines". I see two options:

1) just make the smuflcode apply everywhere, and not bother with
variable args. Use your editor's search & replace to change
fet_beginchar everywhere inserting the "0" as needed. Since you're
using strings, you can also use magic code (eg. "undef") which is
easier to grep for afterwards.

2) set the smuflcode to "undef" in the fet_beginchar() macro, and
provide a set_smufl_code() macro that allows an override. You only
insert the override in the chars for which you define a smufl code.

--
Han-Wen Nienhuys - hanwenn@gmail.com - http://www.xs4all.nl/~hanwen



reply via email to

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