Am 06.03.2015 13:59, schrieb David Nalesnik:
Hi Urs,

On Fri, Mar 6, 2015 at 2:06 AM, Urs Liska <[email protected] <mailto:[email protected]>> wrote:

    Hi,

    I've got a new notation font (which is going to be released soon),
    and this font contains a few historic extra glyphs that I would
    like to add as articulations. (One can access them as \markup but
    articulations would be more consistent).

    Some research indicates that there are two things to be done for this:

    - Add a definition to #default-script-alist
    - Create a command

    The following code adds an entry to #default-script-alist

    % Add the script definition to the global list
    % -> This doesn't work!
    #(set! default-script-alist
            (append default-script-alist

Change append to append!  and it works.

Hey, you're my hero (again) :-)
Indeed it does work!

Now I'd love to give an explanation, but I don't understand why "append" shouldn't work in this instance...

Huh? Very strange. First I don't understand it Scheme-wise. Of course append doesn't modifiy the list, but the newly concatenated list should be applied using set!

And particularly I could verify with #'(display default-script-alist) that even before the entry was actually appended to default-script-alist. The only thing I can imagine is that at some point (before my intervention) a copy is created of that list, and that my modification doesn't affect that copy. I didn't find the reference right now, but I recall that there is a string operation that creates a reference to an original string, but if that original string is modified the reference is replaced by a newly allocated and copied string. Maybe it's something like this.


Note that there is a warning:

warning: Script has empty extent and non-empty stencil.

Did you get this when you modified scm/script.scm directly?

I don't get this at all. You are getting it because "weakbeat" is pointing to a non-existent glyph in Emmentaler.

Best and many thanks
Urs


--David


--
Urs Liska
[email protected]

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to