]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/font-metric-scheme.cc
(char): use ly:wide-char->utf-8
[lilypond.git] / lily / font-metric-scheme.cc
index 5928c2066c33e35d2c542c195dd5864884293f1b..c39d79494a55f02ef15e9e5501fea7639aa80794 100644 (file)
@@ -3,9 +3,10 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
+#include "warn.hh"
 #include "stencil.hh"
 #include "font-metric.hh"
 #include "modified-font-metric.hh"
@@ -97,6 +98,10 @@ LY_DEFINE (ly_text_dimension, "ly:text-dimension",
                   ly_interval2scm (stc.extent (Y_AXIS)));
 }
 
+
+/*
+  TODO: when are non string retvals allowed?
+ */
 LY_DEFINE (ly_font_file_name, "ly:font-file-name",
           1, 0, 0,
           (SCM font),
@@ -105,7 +110,9 @@ LY_DEFINE (ly_font_file_name, "ly:font-file-name",
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  return fm->font_file_name ();
+  SCM name = fm->font_file_name ();
+
+  return name;
 }
 
 LY_DEFINE (ly_font_name, "ly:font-name",
@@ -117,13 +124,13 @@ LY_DEFINE (ly_font_name, "ly:font-name",
   Font_metric *fm = unsmob_metrics (font);
 
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  return scm_makfrom0str (fm->font_name ().to_str0 ());
+  return scm_makfrom0str (fm->font_name ().c_str ());
 }
 
 LY_DEFINE (ly_font_magnification, "ly:font-magnification", 1, 0, 0,
           (SCM font),
           "Given the font metric @var{font}, return the "
-          "magnification, relative to the current outputscale.")
+          "magnification, relative to the current outputs-cale.")
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
@@ -133,7 +140,7 @@ LY_DEFINE (ly_font_magnification, "ly:font-magnification", 1, 0, 0,
 LY_DEFINE (ly_font_design_size, "ly:font-design-size", 1, 0, 0,
           (SCM font),
           "Given the font metric @var{font}, return the "
-          "design size, relative to the current outputscale.")
+          "design size, relative to the current output-scale.")
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");