X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fmodified-font-metric.cc;h=ad43d756bc38f4dd74846abc50707dbcdb293f9d;hb=d00966597a77c7f37b67fbecf12150156b483a84;hp=8e215863a6109a600344a11ae9c181491b2f5a39;hpb=31568c504806f35aac420a394c9eab07abd9faa7;p=lilypond.git diff --git a/lily/modified-font-metric.cc b/lily/modified-font-metric.cc index 8e215863a6..ad43d756bc 100644 --- a/lily/modified-font-metric.cc +++ b/lily/modified-font-metric.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1999--2006 Han-Wen Nienhuys + (c) 1999--2007 Han-Wen Nienhuys */ #include using namespace std; @@ -13,8 +13,8 @@ using namespace std; #include "text-metrics.hh" #include "warn.hh" #include "stencil.hh" -#include "lookup.hh" #include "main.hh" +#include "program-option.hh" Modified_font_metric::Modified_font_metric (Font_metric *fm, Real magnification) @@ -179,16 +179,19 @@ Modified_font_metric::text_stencil (string text) const 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 ()) + SCM stext = ly_string2scm (text); + + Box b; + if (get_output_backend_name () == "tex") { - b.scale (magnification_); - return b; - } + b = lookup_tex_text_dimension (orig_, stext); + + if (!b[Y_AXIS].is_empty ()) + { + b.scale (magnification_); + return b; + } - if (output_backend_global == "tex") - { b = tex_kludge (text); return b; }