On Fri, Sep 19, 2008 at 9:29 AM, Risto Vääräniemi <[EMAIL PROTECTED]> wrote: > Hi all, > > Can someone tell me how I can get the text width inside scheme? > > There's a method called ly:text-dimension that takes font metric and > the text as parameters and gives the dimensions. Alright - I should > get the font metric somehow. I tried (let ((fontMetr (ly:grob-property > BarNumber 'font))) (...)) but the fontMetr is not a font metric > (ly:font-metric? returns false) although the description in > font-interface made me think so.
This is sort-of a bug. The 'font is only set in C++, from Font_interface::get_default_font (Grob *me) we should change this so it uses the standard property calculation scheme. Then your sample code works correctly. -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen
_______________________________________________ lilypond-user mailing list [email protected] http://lists.gnu.org/mailman/listinfo/lilypond-user
