]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/font-metric.cc
Run `make grand-replace'.
[lilypond.git] / lily / font-metric.cc
index 70017df10c41ca2a20d7eeed092d5715e2a843bc..9901f4c38292987ab9376ac524d1c2e2e53a8a6c 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1999--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1999--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   Mats Bengtsson <matsb@s3.kth.se> (the ugly TeX parsing in text_dimension)
 */
@@ -18,7 +18,6 @@ using namespace std;
 #include "modified-font-metric.hh"
 #include "open-type-font.hh"
 #include "stencil.hh"
-#include "virtual-methods.hh"
 #include "warn.hh"
 
 #include "ly-smobs.icc"
@@ -32,7 +31,7 @@ Font_metric::design_size () const
 Stencil
 Font_metric::find_by_name (string s) const
 {
-  replace_all (s, '-', 'M');
+  replace_all (&s, '-', 'M');
   int idx = name_to_index (s);
   Box b;
 
@@ -41,7 +40,7 @@ Font_metric::find_by_name (string s) const
     {
       expr = scm_list_3 (ly_symbol2scm ("named-glyph"),
                         self_scm (),
-                        scm_makfrom0str (s.c_str ()));
+                        ly_string2scm (s));
       b = get_indexed_char (idx);
     }
 
@@ -180,14 +179,17 @@ Font_metric::sub_fonts () const
 }
 
 Stencil
-Font_metric::text_stencil (string str) const
+Font_metric::word_stencil (string str) const
 {
-  SCM lst = scm_list_3 (ly_symbol2scm ("text"),
-                       this->self_scm (),
-                       scm_makfrom0str (str.c_str ()));
+  return text_stencil (str);
+}
 
-  Box b = text_dimension (str);
-  return Stencil (b, lst);
+Stencil
+Font_metric::text_stencil (string str) const
+{
+  (void) str;
+  programming_error("Cannot get a text stencil from this font");
+  return Stencil (Box (), SCM_EOL);
 }
 
 Box