]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/font-metric-scheme.cc
Remove ly:get-glyph and supporting infrastructure.
[lilypond.git] / lily / font-metric-scheme.cc
index 55373f72c8de1f0c51329c3133e31c34e37bca22..408ede794887f63967214d501d534aa4bdd9518f 100644 (file)
@@ -31,7 +31,8 @@ LY_DEFINE (ly_font_get_glyph, "ly:font-get-glyph",
           "\n"
           "Note that this command can only be used to access glyphs from"
           " fonts loaded with @code{ly:system-font-load}; currently, this"
-          " means either the Emmentaler or Aybabtu fonts, corresponding"
+          " means either the Emmentaler or Emmentaler-Brace "
+           " fonts, corresponding"
           " to the font encodings @code{fetaMusic} and @code{fetaBraces},"
           " respectively.")
 {
@@ -45,25 +46,6 @@ LY_DEFINE (ly_font_get_glyph, "ly:font-get-glyph",
   return m.smobbed_copy ();
 }
 
-LY_DEFINE (ly_get_glyph, "ly:get-glyph",
-          2, 0, 0,
-          (SCM font, SCM index),
-          "Retrieve a stencil for the glyph numbered @var{index}"
-          " in @var{font}.\n"
-          "\n"
-          "Note that this command can only be used to access glyphs from"
-          " fonts loaded with @code{ly:system-font-load}; currently, this"
-          " means either the Emmentaler or Aybabtu fonts, corresponding"
-          " to the font encodings @code{fetaMusic} and @code{fetaBraces},"
-          " respectively.")
-{
-  Font_metric *fm = unsmob_metrics (font);
-  LY_ASSERT_SMOB (Font_metric, font, 1);
-  LY_ASSERT_TYPE (scm_is_number, index,2);
-
-  return fm->get_ascii_char_stencil (scm_to_int (index)).smobbed_copy ();
-}
-
 LY_DEFINE (ly_font_glyph_name_to_index, "ly:font-glyph-name-to-index",
           2, 0, 0,
           (SCM font, SCM name),
@@ -71,7 +53,7 @@ LY_DEFINE (ly_font_glyph_name_to_index, "ly:font-glyph-name-to-index",
           "\n"
           "Note that this command can only be used to access glyphs from"
           " fonts loaded with @code{ly:system-font-load}; currently, this"
-          " means either the Emmentaler or Aybabtu fonts, corresponding"
+          " means either the Emmentaler or Emmentaler-Brace fonts, corresponding"
           " to the font encodings @code{fetaMusic} and @code{fetaBraces},"
           " respectively.")
 {
@@ -89,7 +71,7 @@ LY_DEFINE (ly_font_index_to_charcode, "ly:font-index-to-charcode",
           "\n"
           "Note that this command can only be used to access glyphs from"
           " fonts loaded with @code{ly:system-font-load}; currently, this"
-          " means either the Emmentaler or Aybabtu fonts, corresponding"
+          " means either the Emmentaler or Emmentaler-Brace fonts, corresponding"
           " to the font encodings @code{fetaMusic} and @code{fetaBraces},"
           " respectively.")
 {
@@ -107,7 +89,7 @@ LY_DEFINE (ly_font_glyph_name_to_charcode, "ly:font-glyph-name-to-charcode",
           "\n"
           "Note that this command can only be used to access glyphs from"
           " fonts loaded with @code{ly:system-font-load}; currently, this"
-          " means either the Emmentaler or Aybabtu fonts, corresponding"
+          " means either the Emmentaler or Emmentaler-Brace fonts, corresponding"
           " to the font encodings @code{fetaMusic} and @code{fetaBraces},"
           " respectively.")
 {
@@ -118,25 +100,6 @@ LY_DEFINE (ly_font_glyph_name_to_charcode, "ly:font-glyph-name-to-charcode",
   return scm_from_unsigned_integer (fm->index_to_charcode (fm->name_to_index (ly_scm2string (name))));
 }
 
-LY_DEFINE (ly_text_dimension, "ly:text-dimension",
-          2, 0, 0,
-          (SCM font, SCM text),
-          "Given the font metric in @var{font} and the string @var{text},"
-          " compute the extents of that text in that font.  The return"
-          " value is a pair of number-pairs.")
-{
-  Box b;
-  Modified_font_metric *fm = dynamic_cast<Modified_font_metric *>
-    (unsmob_metrics (font));
-
-  LY_ASSERT_SMOB (Font_metric, font, 1);
-  LY_ASSERT_TYPE (scm_is_string, text, 2);
-  Stencil stc (fm->text_stencil (ly_scm2string (text), false));
-  return scm_cons (ly_interval2scm (stc.extent (X_AXIS)),
-                  ly_interval2scm (stc.extent (Y_AXIS)));
-}
-
-
 /*
   TODO: when are non string retvals allowed?
  */