X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ffont-metric-scheme.cc;h=18edb7513a060344de7036c85cb641ae29376493;hb=d1f044d19e0e3c163374973ee8a6c61611c3408e;hp=c39d79494a55f02ef15e9e5501fea7639aa80794;hpb=bba61e525a34ff81878e5a8a89b7c8b9a7206f5c;p=lilypond.git diff --git a/lily/font-metric-scheme.cc b/lily/font-metric-scheme.cc index c39d79494a..18edb7513a 100644 --- a/lily/font-metric-scheme.cc +++ b/lily/font-metric-scheme.cc @@ -3,12 +3,13 @@ source file of the GNU LilyPond music typesetter - (c) 2005--2006 Han-Wen Nienhuys + (c) 2005--2007 Han-Wen Nienhuys */ +#include "font-metric.hh" + #include "warn.hh" #include "stencil.hh" -#include "font-metric.hh" #include "modified-font-metric.hh" LY_DEFINE (ly_font_get_glyph, "ly:font-get-glyph", @@ -73,11 +74,8 @@ LY_DEFINE (ly_font_glyph_name_to_charcode, "ly:font-glyph-name-to-charcode", Font_metric *fm = unsmob_metrics (font); SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric"); SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG2, __FUNCTION__, "string"); -#if 1 + return scm_from_unsigned_integer (fm->index_to_charcode (fm->name_to_index (ly_scm2string (name)))); -#else - return scm_from_unsigned_integer (fm->glyph_name_to_charcode (ly_scm2string (name))); -#endif } LY_DEFINE (ly_text_dimension, "ly:text-dimension", @@ -124,7 +122,7 @@ 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 ().c_str ()); + return ly_string2scm (fm->font_name ()); } LY_DEFINE (ly_font_magnification, "ly:font-magnification", 1, 0, 0,