]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/text-item.cc
remove TEXMF from variables.
[lilypond.git] / lily / text-item.cc
index 066789fad871277e3b3c8b938b06eeb9da2cef13..a45a3c84b873699ec3e1056750e4c3c379cd499c 100644 (file)
@@ -1,17 +1,17 @@
-/*   
+/*
   text-item.cc -- implement Text_interface
 
   source file of the GNU LilyPond music typesetter
-  
-  (c) 1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-                 Jan Nieuwenhuizen <janneke@gnu.org>
+
+  (c) 1998--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include "text-item.hh"
 
 #include <math.h>
 
-#include "main.hh" 
+#include "main.hh"
 #include "config.hh"
 #include "pango-font.hh"
 #include "warn.hh"
 #include "font-interface.hh"
 #include "output-def.hh"
 #include "modified-font-metric.hh"
-#include "ly-module.hh"
-
 
-MAKE_SCHEME_CALLBACK (Text_interface, interpret_string, 3)
+MAKE_SCHEME_CALLBACK (Text_interface, interpret_string, 3);
 SCM
 Text_interface::interpret_string (SCM layout_smob,
                                  SCM props,
                                  SCM markup)
 {
   Output_def *layout = unsmob_output_def (layout_smob);
-  
+
   SCM_ASSERT_TYPE (layout, layout_smob, SCM_ARG1,
                   __FUNCTION__, "Layout definition");
   SCM_ASSERT_TYPE (scm_is_string (markup), markup, SCM_ARG3,
@@ -37,20 +35,11 @@ Text_interface::interpret_string (SCM layout_smob,
 
   String str = ly_scm2string (markup);
 
-#if HAVE_PANGO_FT2
-  if (output_backend_global != "tex"
-      && output_backend_global != "texstr")
-    {
-      Font_metric *fm = select_pango_font (layout, props);
-      return fm->text_stencil (str).smobbed_copy ();
-    }
-#endif
-  
   Font_metric *fm = select_encoded_font (layout, props);
-  return fm->text_stencil (str).smobbed_copy();
+  return fm->text_stencil (str).smobbed_copy ();
 }
 
-MAKE_SCHEME_CALLBACK (Text_interface, interpret_markup, 3)
+MAKE_SCHEME_CALLBACK (Text_interface, interpret_markup, 3);
 SCM
 Text_interface::interpret_markup (SCM layout_smob, SCM props, SCM markup)
 {
@@ -62,29 +51,29 @@ Text_interface::interpret_markup (SCM layout_smob, SCM props, SCM markup)
       SCM args = scm_cdr (markup);
       if (!markup_p (markup))
        programming_error ("Markup head has no markup signature.");
-      
+
       return scm_apply_2 (func, layout_smob, props, args);
     }
   else
     {
       programming_error ("Is not a markup: ");
-      scm_display (markup, scm_current_error_port());
+      scm_display (markup, scm_current_error_port ());
       assert (false);
       Box b;
-      b[X_AXIS].set_empty();
-      b[Y_AXIS].set_empty();
-      
-      Stencil s(b, SCM_EOL);
-      return s.smobbed_copy();
+      b[X_AXIS].set_empty ();
+      b[Y_AXIS].set_empty ();
+
+      Stencil s (b, SCM_EOL);
+      return s.smobbed_copy ();
     }
 }
 
-MAKE_SCHEME_CALLBACK (Text_interface,print,1);
+MAKE_SCHEME_CALLBACK (Text_interface, print, 1);
 SCM
 Text_interface::print (SCM grob)
 {
   Grob *me = unsmob_grob (grob);
-  
+
   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);
@@ -101,10 +90,7 @@ Text_interface::markup_p (SCM x)
                                      ly_symbol2scm ("markup-signature"))));
 }
 
-ADD_INTERFACE (Text_interface,"text-interface",
+ADD_INTERFACE (Text_interface, "text-interface",
               "A scheme markup text, see @usermanref{Text-markup}.",
               "text baseline-skip word-space");
 
-
-
-