Scheme name.
* scm/define-markup-commands.scm:
* scm/safe-lily.scm: Bugfix: ly:font-by-name.
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
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");
#\"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))
(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?)
(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)
(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
(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)))
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