[Top][All Lists]

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

Re: Questions regarding creation of a new glyph (was: White diamond, bl

From: Han-Wen Nienhuys
Subject: Re: Questions regarding creation of a new glyph (was: White diamond, black diamond, and possible small sponsorship?)
Date: Tue, 23 Jan 2007 23:55:45 +0100
User-agent: Thunderbird (X11/20061219)

Maximilian Albert escreveu:
> On to my questions:
> 1) Is it correct that all I need to do in order to create a new glyph is
> to modify the metafont source file of the corresponding font? That is,
> are all the other files (*.otf, *.svg, etc.) created during the
> compilation process of lilypond? (My experiments seem to indicate this).


> Inspecting the other font formats I saw that the svg files sometimes
> contain unicode numbers of the glyphs (although not for the parmesan
> font, as it seems). Do I have to take care of that and other related
> issues or can I ignore these aspects and rely on the compilation process
> to sort it all out?

Ignore, just copy the pattern of the other glyphs.

>   \once \override NoteHead #'style = #'harmonic
>   \once \override NoteHead #'glyph-name = #'"2harmonic"

if you set glyph-name, style is no longer necessary.

> (BTW, the definition in mf/ is 's2harmonic' -- what
> causes the leading 's' to be inserted in the name?).

s is for symmetric. Some heads have u and d forms (upstem, downstem).

> Now with neomensural instead of harmonic style, lilypond prints the
> black notehead automatically when the note has quarter duration. This
> automatic recognition of the "correct" head does not work yet with the
> new harmonic glyph. Which further changes in the source are required to
> implement this? I hoped that the digit "2" in the name would be enough
> to tell lilypond to use the black head (similar to the neomensural
> case), but I was wrong. Any hints? If this behaviour is not related to

see scm/output-lib.scm, function note-head::calc-glyph-name.

Also, see define-grobs.scm , grob NoteHead to see how all these
functions work together.

> 4) In the *.mf file there already exists a function called
> "draw_neomensural_black_head" which draws a black diamond of the
> required shape. It is called when drawing the open diamond (the black
> head is overwritten with a smaller white one to create the open
> notehead). Since the functionality is already there -- is there a good
> reason why the black diamond is not yet included as a separate glyph in

A harmonic head is slightly bigger so it protudes through the staff
lines, if printed in a space. AFAIK, they only exist in the open form,
and Trevor's use of the black form is not canonical. 

> 5) IIRC, some time ago there were other questions related to fonts which
> mentioned the inadequacy of certain formats and suggested a conversion
> of the fonts. Since font issues are still a rather closed book to me --
> is the *.mf file the right place at all to make changes?

yes, but do take the hints in mf/README at heart.

> 6) Possibly this is related to question 5: After compiling my modified
> git version of lilypond and processing a sample *.ly file, all the
> glyphs (including, e.g., clefs) seem to have rather "rough" outlines
> when viewing the *.pdf output with xpdf (on Debian Linux). Increasing
> the zoom level smoothens them out a bit, which indicates that it is
> probably only a viewing problem (in addition, they appear perfectly
> smooth in Acrobat Reader). But since the font files shipped with the
> "official" binary do not show this behaviour -- am I missing something?
> Is there another way to compile the fonts which makes them behave more
> nicely?

It might be related to the version of fontforge that you use. 


Han-Wen Nienhuys - address@hidden -

LilyPond Software Design
 -- Code for Music Notation

reply via email to

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