|
From: | Urs Liska |
Subject: | Re: TextScript.outside-staff-padding and text's baseline |
Date: | Sun, 21 Oct 2018 11:37:21 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Am 21.10.2018 um 11:03 schrieb David
Kastrup:
Torsten Hämmerle <address@hidden> writes:David Kastrup wroteAnything wrong with using a callback?No, not at all, callbacks are fine and do solve the problem.. But given the fact that "aligning to the baseline" is specific to text so that different up/down staff-padding values are rather the rule than the exception, I thought it'd be nicer to simply say something like \override TextScript.staff-padding = #'(3 . 4) instead of having to define a custom callback function for a standard situation.Given how often this occurs, maybe we should create some function for that purpose rather than putting pairs everywhere in peacemeal? That sounds reasonable. Is there *any* chance that LilyPond actually accesses the font metrics to *calculate* the difference? What I would expect a proper "staff-padding" behaviour for texts would be:
Providing a pair would actually be doing that calculation by trial-and-error. One could probably calculate the difference "manually" by comparing the extents of (transparent) "T", "j", and "Tj" markups, but it would probably be more reliable if it could be retrieved from the font itself.
Urs The principal question is what to do when the event does not have an explicit direction. Then one would have to refer to the grob callback instead, maybe? |
[Prev in Thread] | Current Thread | [Next in Thread] |