source file of the GNU LilyPond music typesetter
- (c) 1998--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1998--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
*/
#include "text-interface.hh"
-#include <math.h>
#include "main.hh"
#include "config.hh"
SCM_ASSERT_TYPE (scm_is_string (markup), markup, SCM_ARG3,
__FUNCTION__, "string");
- String str = ly_scm2string (markup);
+ string str = ly_scm2string (markup);
Font_metric *fm = select_encoded_font (layout, props);
- return fm->text_stencil (str).smobbed_copy ();
+ return fm->word_stencil (str).smobbed_copy ();
}
MAKE_SCHEME_CALLBACK (Text_interface, interpret_markup, 3);
{
SCM func = scm_car (markup);
SCM args = scm_cdr (markup);
- if (!markup_p (markup))
+ if (!is_markup (markup))
programming_error ("markup head has no markup signature");
return scm_apply_2 (func, layout_smob, props, args);
}
else
{
- programming_error ("not a markup: ");
+ programming_error ("Object is not a markup. ");
+ scm_puts ("This object should be a markup: ", scm_current_error_port ());
scm_display (markup, scm_current_error_port ());
- assert (false);
+ scm_puts ("\n", scm_current_error_port ());
+
Box b;
b[X_AXIS].set_empty ();
b[Y_AXIS].set_empty ();
SCM t = me->get_property ("text");
SCM chain = Font_interface::text_font_alist_chain (me);
- return interpret_markup (me->get_layout ()->self_scm (), chain, t);
+ return interpret_markup (me->layout ()->self_scm (), chain, t);
}
/* Ugh. Duplicated from Scheme. */
bool
-Text_interface::markup_p (SCM x)
+Text_interface::is_markup (SCM x)
{
return (scm_is_string (x)
|| (scm_is_pair (x)
ly_symbol2scm ("markup-signature"))));
}
-ADD_INTERFACE (Text_interface, "text-interface",
+ADD_INTERFACE (Text_interface,
"A scheme markup text, see @usermanref{Text markup}.",
- "text baseline-skip word-space");
+ "baseline-skip "
+ "text "
+ "word-space "
+ "text-direction "
+ );