From: Jan Nieuwenhuizen Date: Sat, 11 Dec 2004 12:24:11 +0000 (+0000) Subject: * lily/font-metric.cc (LY_DEFINE): Also rename C name to match X-Git-Tag: release/2.5.14~459 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=65be52562bbf547e4083de5779f4ed0978aa8383;p=lilypond.git * lily/font-metric.cc (LY_DEFINE): Also rename C name to match Scheme name. * scm/define-markup-commands.scm: * scm/safe-lily.scm: Bugfix: ly:font-by-name. --- diff --git a/ChangeLog b/ChangeLog index 211ddfcc26..fabdd03bbc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2004-12-11 Jan Nieuwenhuizen + * lily/font-metric.cc (LY_DEFINE): Also rename C name to match + Scheme name. + + * scm/define-markup-commands.scm: + * scm/safe-lily.scm: Bugfix: ly:font-by-name. + * configure.in: Require makeinfo 4.7 (needed for @ifdocbook). * stepmake/aclocal.m4 (STEPMAKE_GET_VERSION): Grok fontforge-like diff --git a/lily/font-metric.cc b/lily/font-metric.cc index 1a4d3b4268..63f45abe96 100644 --- a/lily/font-metric.cc +++ b/lily/font-metric.cc @@ -130,14 +130,12 @@ IMPLEMENT_DEFAULT_EQUAL_P (Font_metric); IMPLEMENT_TYPE_P (Font_metric, "ly:font-metric?"); -LY_DEFINE (ly_find_glyph_by_name, "ly:font-get-glyph", +LY_DEFINE (ly_font_get_glyph, "ly:font-get-glyph", 2, 0, 0, (SCM font, SCM name), - "This function retrieves a Stencil for the glyph named @var{name} " - "in " - "@var{font}. " - "The font must be available as an AFM file. If the glyph " - "is not found, @code{#f} is returned. ") + "Return a Stencil from @var{font} for the glyph named @var{name}. " + "@var{font} must be available as an AFM file. If the glyph " + "is not available, return @code{#f}.") { Font_metric *fm = unsmob_metrics (font); SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric"); diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index fd1dfb5c27..1e8395f2f6 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -383,7 +383,7 @@ alignment accordingly." #\"accidentals-0\"} will select the natural sign from the music font. See @usermanref{The Feta font} for a complete listing of the possible glyphs. " - (ly:find-glyph-by-name + (ly:font-get-glyph (ly:paper-get-font layout (cons '((font-encoding . fetaMusic)) props)) glyph-name)) @@ -391,7 +391,7 @@ See @usermanref{The Feta font} for a complete listing of the possible glyphs. (def-markup-command (lookup layout props glyph-name) (string?) "Lookup a glyph by name." - (ly:find-glyph-by-name (ly:paper-get-font layout props) + (ly:font-get-glyph (ly:paper-get-font layout props) glyph-name)) (def-markup-command (char layout props num) (integer?) @@ -449,7 +449,7 @@ and/or @code{extra-offset} properties. " (let* ((font (ly:paper-get-font layout (cons '((font-encoding . fetaMusic)) props))) (size (chain-assoc-get 'font-size props 0)) (stem-length (* (magstep size) (max 3 (- log 1)))) - (head-glyph (ly:find-glyph-by-name + (head-glyph (ly:font-get-glyph font (string-append "noteheads-s" (number->string (min log 2))))) (stem-thickness 0.13) @@ -464,7 +464,7 @@ and/or @code{extra-offset} properties. " (cons (min stemy attachy) (max stemy attachy)) (/ stem-thickness 3)))) - (dot (ly:find-glyph-by-name font "dots-dot")) + (dot (ly:font-get-glyph font "dots-dot")) (dotwid (interval-length (ly:stencil-extent dot X))) (dots (and (> dot-count 0) (apply ly:stencil-add @@ -474,7 +474,7 @@ and/or @code{extra-offset} properties. " (iota dot-count 1))))) (flaggl (and (> log 2) (ly:stencil-translate - (ly:find-glyph-by-name font + (ly:font-get-glyph font (string-append "flags-" (if (> dir 0) "u" "d") (number->string log))) diff --git a/scm/safe-lily.scm b/scm/safe-lily.scm index a90a6c3056..5baaf1c8b7 100644 --- a/scm/safe-lily.scm +++ b/scm/safe-lily.scm @@ -33,7 +33,7 @@ ly:duration