]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/font-metric.cc
* scm/framework-ps.scm (write-preamble): use it to pick exactly
[lilypond.git] / lily / font-metric.cc
index a3acc19d88c68fc0be9f9ef527c6d6df67148c43..5d472bcc2c62b98dcf21fe0e5dc0e2014c0e8807 100644 (file)
@@ -3,15 +3,16 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1999--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1999--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   Mats Bengtsson <matsb@s3.kth.se> (the ugly TeX parsing in text_dimension)
 */
 
 #include "font-metric.hh"
 
-#include <math.h>
+#include <cmath>
 #include <cctype>
+using namespace std;
 
 #include "dimensions.hh"
 #include "modified-font-metric.hh"
@@ -111,7 +112,7 @@ Font_metric::print_smob (SCM s, SCM port, scm_print_state *)
 {
   Font_metric *m = unsmob_metrics (s);
   scm_puts ("#<", port);
-  scm_puts (classname (m), port);
+  scm_puts (m->class_name (), port);
   scm_puts (" ", port);
   scm_write (m->description_, port);
   scm_puts (">", port);
@@ -135,8 +136,6 @@ Font_metric::font_name () const
   return s;
 }
 
-#include "afm.hh"
-
 int
 Font_metric::index_to_ascii (int i) const
 {
@@ -153,7 +152,7 @@ Stencil
 Font_metric::get_ascii_char_stencil (int code) const
 {
   SCM at = scm_list_3 (ly_symbol2scm ("char"), self_scm (),
-                      scm_int2num (code));
+                      scm_from_int (code));
   Box b = get_ascii_char (code);
   return Stencil (b, at);
 }
@@ -162,7 +161,7 @@ Stencil
 Font_metric::get_indexed_char_stencil (int code) const
 {
   int idx = index_to_ascii (code);
-  SCM at = scm_list_3 (ly_symbol2scm ("char"), self_scm (), scm_int2num (idx));
+  SCM at = scm_list_3 (ly_symbol2scm ("char"), self_scm (), scm_from_int (idx));
   Box b = get_indexed_char (code);
   return Stencil (b, at);
 }