2, 0, 0,
(SCM font, SCM name),
"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}.")
+ " If the glyph is not available, return an empty stencil.")
{
Font_metric *fm = unsmob_metrics (font);
LY_ASSERT_SMOB (Font_metric, font, 1);
else if (type == ly_symbol2scm ("trill"))
return make_trill_line (me, from, to);
- Stencil stil;
+ Stencil stencil;
if (type == ly_symbol2scm ("dashed-line") || type == ly_symbol2scm ("dotted-line"))
{
*/
period = ((to-from).length () - period * fraction) / n;
}
- stil = make_dashed_line (thick, from, to, period, fraction);
+ stencil = make_dashed_line (thick, from, to, period, fraction);
}
else
- stil = make_line (thick, from, to);
+ stencil = make_line (thick, from, to);
- return stil;
+ return stencil;
}
ADD_INTERFACE (Line_interface,
\\musicglyph #\"clefs.G_change\"
}
@end lilypond"
- (ly:font-get-glyph
- (ly:paper-get-font layout (cons '((font-encoding . fetaMusic))
- props))
- glyph-name))
+
+ (let* ((font (ly:paper-get-font layout (cons '((font-encoding . fetaMusic))
+ props)))
+ (glyph (ly:font-get-glyph font glyph-name)))
+ (if (null? (ly:stencil-expr glyph))
+ (ly:warning (_ "Cannot find glyph ~a") glyph-name))
+
+ glyph))
(define-builtin-markup-command (lookup layout props glyph-name)
(string?)