source file of the GNU LilyPond music typesetter
- (c) 1999--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ (c) 1999--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
#include <cctype>
using namespace std;
#include "text-metrics.hh"
#include "warn.hh"
#include "stencil.hh"
-#include "lookup.hh"
#include "main.hh"
Modified_font_metric::Modified_font_metric (Font_metric *fm,
Box
Modified_font_metric::text_dimension (string text) const
{
- SCM stext = scm_makfrom0str (text.c_str ());
- Box b = lookup_tex_text_dimension (orig_, stext);
- if (!b[Y_AXIS].is_empty ())
- {
- b.scale (magnification_);
- return b;
- }
-
+ SCM stext = ly_string2scm (text);
+
+ Box b;
if (output_backend_global == "tex")
{
+ b = lookup_tex_text_dimension (orig_, stext);
+
+ if (!b[Y_AXIS].is_empty ())
+ {
+ b.scale (magnification_);
+ return b;
+ }
+
b = tex_kludge (text);
return b;
}