lilypond-devel
[Top][All Lists]
Advanced

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

Understanding and modifying font nodes


From: Urs Liska
Subject: Understanding and modifying font nodes
Date: Sun, 26 Apr 2015 01:05:49 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

I have wrapped around about anything I could think of, but I'm stuck and would greatly benefit of some help now.

I'm working on the font interface and will (hopefully soon) present a patch that may improve font handling (with the new alternative fonts provided by Abraham) significantly. The last big obstacle is modifying the add-font procedure in font.scm to an "add-or-replace-font" behaviour. The idea is removing the annoying limitation that fonts can only be set once and not reset. In order to change anything one has to recreate the complete font-tree.

Investigating add-font shows that this limitation is somewhat intended.
In the line when it says
(if (not child)
the procedure is skipped when the font node has already been set, so this is what I want to change.

When I try to remove that conditional I *can* reset the fonts, but two things happen: - I get the right font but with the wrong variant (bold italic instead of default upright). - All fonts seem to overwrite the 'roman' variant, regardless of what variant has been passed as argument

It boils down that I simply don't understand what's going on inside the font nodes and how many of them are processed in the iterations, regardless how much debug printing I use to get to grips with it.

Can anybody help me out with modifying this place in font.scm?
Or at least get me back on track.

Best
Urs




reply via email to

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