]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/font-metric.cc (LY_DEFINE): Also rename C name to match
authorJan Nieuwenhuizen <janneke@gnu.org>
Sat, 11 Dec 2004 12:24:11 +0000 (12:24 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sat, 11 Dec 2004 12:24:11 +0000 (12:24 +0000)
Scheme name.

* scm/define-markup-commands.scm:
* scm/safe-lily.scm: Bugfix: ly:font-by-name.

ChangeLog
lily/font-metric.cc
scm/define-markup-commands.scm
scm/safe-lily.scm

index 211ddfcc267e0e09e4feb0bf71c142d1d6348ff5..fabdd03bbcdfa71569469b6e72d16b53ea2aeb44 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2004-12-11  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+       * 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
index 1a4d3b42685cca82022280c5ad8bf07d706603f8..63f45abe96860d4312b201228c0ec87f58c3be5d 100644 (file)
@@ -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");
index fd1dfb5c27a3fcf3349dcd630eca572bfa83b259..1e8395f2f6347b418f5b6d97ffd58a5a61ec1e7f 100644 (file)
@@ -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)))
index a90a6c30565b5b1daab11f32cb9c2fb322ef4d9f..5baaf1c8b7f458a22018651332f597e68b6eca37 100644 (file)
@@ -33,7 +33,7 @@
      ly:duration<?
      ly:duration?
      ly:export
-     ly:find-glyph-by-name
+     ly:font-get-glyph
      ly:font-design-size
      ly:font-encoding-alist
      ly:font-file-name