]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/font-metric.cc
(enumerate_attachments): use stem_extent_
[lilypond.git] / lily / font-metric.cc
index 6e07465592b028c0f9fe7eea374bc442ee1eee78..64224c48ea3854645df259bd855624f04eb2472f 100644 (file)
@@ -6,12 +6,12 @@
   (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
     Mats Bengtsson <matsb@s3.kth.se> (the ugly TeX parsing in text_dimension)
- */
+*/
 
 #include <math.h>
 #include <ctype.h>
 
-#include "scaled-font-metric.hh"
+#include "modified-font-metric.hh"
 #include "virtual-methods.hh"
 #include "warn.hh"
 #include "stencil.hh"
@@ -91,7 +91,7 @@ Font_metric::name_to_index (String) const
 }
 
 Offset
-Font_metric::get_indexed_wxwy (int )const
+Font_metric::get_indexed_wxwy (intconst
 {
   return Offset (0, 0);
 }
@@ -139,7 +139,7 @@ LY_DEFINE (ly_find_glyph_by_name, "ly:find-glyph-by-name",
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  SCM_ASSERT_TYPE (ly_c_string_p (name), name, SCM_ARG2, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG2, __FUNCTION__, "string");
 
   Stencil m = fm->find_by_name (ly_scm2string (name));
 
@@ -155,9 +155,9 @@ LY_DEFINE (ly_get_glyph, "ly:get-glyph",
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  SCM_ASSERT_TYPE (is_number (index), index, SCM_ARG2, __FUNCTION__, "number");
+  SCM_ASSERT_TYPE (scm_is_number (index), index, SCM_ARG2, __FUNCTION__, "number");
 
-  return fm->get_ascii_char_stencil (ly_scm2int (index)).smobbed_copy ();
+  return fm->get_ascii_char_stencil (scm_to_int (index)).smobbed_copy ();
 }
 
 LY_DEFINE (ly_text_dimension,"ly:text-dimension",
@@ -171,7 +171,7 @@ LY_DEFINE (ly_text_dimension,"ly:text-dimension",
   Modified_font_metric*fm = dynamic_cast<Modified_font_metric*>
     (unsmob_metrics (font));
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "modified font metric");
-  SCM_ASSERT_TYPE (ly_c_string_p (text), text, SCM_ARG2, __FUNCTION__, "string");
+  SCM_ASSERT_TYPE (scm_is_string (text), text, SCM_ARG2, __FUNCTION__, "string");
   
   b = fm->text_dimension (ly_scm2string (text));
   
@@ -186,7 +186,7 @@ LY_DEFINE (ly_font_filename,"ly:font-filename",
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  return ly_car (fm->description_);
+  return scm_car (fm->description_);
 }
 
 
@@ -196,7 +196,7 @@ LY_DEFINE (ly_font_name,"ly:font-name",
           1, 0, 0,
           (SCM font),
           "Given the font metric @var{font}, "
-          "return the corresponding file name.")
+          "return the corresponding name.")
 {
   Font_metric *fm = unsmob_metrics (font);
       
@@ -222,7 +222,7 @@ LY_DEFINE (ly_font_magnification,"ly:font-magnification", 1 , 0, 0,
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  return ly_cdr (fm->description_);
+  return scm_cdr (fm->description_);
 }
 
 LY_DEFINE (ly_font_design_size,"ly:font-design-size", 1 , 0, 0,
@@ -274,5 +274,5 @@ get_encoded_index (Font_metric *m, String input_coding, int code)
                      scm_makfrom0str (input_coding.to_str0 ()),
                      scm_makfrom0str (font_coding.to_str0 ()),
                      scm_int2num (code));
-  return ly_scm2int (s);
+  return scm_to_int (s);
 }