lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Chord Diagrams/Fonts in Scheme


From: Jan Nieuwenhuizen
Subject: Re: Chord Diagrams/Fonts in Scheme
Date: Sat, 24 Apr 2004 01:42:55 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Carl D. Sorensen writes:

> I've been able to rework the chord diagram markup

Great!

> The only problem remaining is that I don't know how to change the size
> of the font in Scheme.  I've searched through the documentation, lily/*
> and scm/*, and haven't been able to figure out how to make the changes.

Try the font-size property, like so:

  (let ((font (ly:paper-get-font paper '(((font-size . 10) (font-family . 
music))))))
  (let ((font (ly:paper-get-font paper '(((font-size . -5) (font-family . 
music))))))

> 1.  Is there a description of what constitutes a font metric in Scheme?
> If so, where do I find it?  If not, could you give me some kind of basic
> explanation?

See the font-interface documentation:

http://www.lilypond.org/doc/v2.3/Documentation/user/out-www/lilypond-internals/font-interface.html

> 2.  I would like to investigate the possibility of adding 10 glyphs to
> the feta font: a circle used to indicate an open string, a symmetric x
> used to indicate a silent string, and the numbers one through four
> surrounded by circles in ordinary (outline and number black, rest white)
> and reverse (outline and number white, rest black).  Is this a
> reasonable thing to do?

Yes, that does sound reasonable.  However, adding glyps is not an very
easy thing to do (your first glyph isn't, anyway.  But if you have the
time and will to learn it, I think it's a very fun and rewarding thing
to do).  Adding a circle would be fairly easy, but drawing a nice
number takes some time to learn and get right.

It may be an option to settle for the glyphs that are already there
(ie: black numbers) for now and try to take another step first: making
an fret-diagram-engraver and fret-diagram class that produce the fret
stencils.  It depends.

> If so, how does one go about adding glyphs to a font?

The font is made with metafont; the sources are in the mf/ directory.
You'll have to learn some basic things about the metafont language.
Making a glyph boils down to drawing a nice-looking version with
pencil and paper, and then finding the smallest possible set of
'control points' or important points, that can be used to draw lines
or curves between that define the outline.

Jan.

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org





reply via email to

[Prev in Thread] Current Thread [Next in Thread]