X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ffont-metric-scheme.cc;h=408ede794887f63967214d501d534aa4bdd9518f;hb=db8c55362bfe478845e2b180eee1ffb7ac87073b;hp=7f57e5d1c35c65e70f7711a89b16a211036a3bd1;hpb=86f3188675e6eda2358b841876d77c30f631e845;p=lilypond.git diff --git a/lily/font-metric-scheme.cc b/lily/font-metric-scheme.cc index 7f57e5d1c3..408ede7948 100644 --- a/lily/font-metric-scheme.cc +++ b/lily/font-metric-scheme.cc @@ -46,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 Emmentaler-Brace 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), @@ -119,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 - (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? */