lilypond-devel
[Top][All Lists]
Advanced

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

Re: Using lookup to extract glyphs


From: Han-Wen Nienhuys
Subject: Re: Using lookup to extract glyphs
Date: Sun, 30 Nov 2008 11:53:26 -0200

The correct way to do this, which incidentally lily uses, is to use
binary search over the glyphs, until you've found the closest one.

On Sat, Nov 29, 2008 at 6:19 PM, Mats Bengtsson
<address@hidden> wrote:
> Quoting Neil Puttock <address@hidden>:
>
>> 2008/11/28 Mats Bengtsson <address@hidden>:
>>>
>>>
>>> Mats Bengtsson wrote:
>>>
>>> Now that I've looked a bit more careful, I see that the total height of
>>> braceN is given by
>>> 10.5*(1+1/150)^N
>>> so in other words, if the desired height is H, you can get the number of
>>> the
>>> corresponding
>>> brace glyph by
>>> (round (/ (log (/ H 10.5)) (log (+ 1 (/ 1 150)))))
>>
>> Thanks for working this out, Mats.
>>
>> How about a middle way, where we have a function to convert from
>> points -> brace number?  Then it's up to the user whether they want
>> direct access to a specific glyph, or conversion from points.
>
> I don't see the point. If a user had the possibility to specify the height
> in points (or any other sensible unit) as the argument, he'd never use the
> weird numbering that's used internally in LilyPond.
>
>   /Mats
>
>
>
> _______________________________________________
> lilypond-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/lilypond-devel
>



-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

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