1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @node Modifying the feta font
3 @chapter Modifying the feta font
6 * Overview of the feta font::
7 * Font creation tools::
8 * Adding a new font section::
10 * Building the changed font::
13 @node Overview of the feta font
14 @section Overview of the feta font
16 The feta font is a font that was created specifically for use in
17 LilyPond. The sources for the font are found in mf/*.mf.
19 The feta font is merged from a number of subfonts. Each subfont
20 can contain at most 223 glyphs.
22 In LilyPond, glyphs are accessed by glyph name, rather than by code point.
23 Therefore, the naming of glyphs is significant.
25 Information about correctly creating glyphs is found in @file{mf/README}.
26 Please make sure you read and understand this file.
28 TODO -- we should get mf/README automatically generated from texinfo source
32 @node Font creation tools
33 @section Font creation tools
35 The sources for the feta font are written in metafont. The definitive
36 reference for metafont is "The METAFONT book". Source for the book is
39 mf2pt1 is used to create type 1 fonts from the metafont sources.
41 FontForge is used to display the resulting glyph shapes.
43 @node Adding a new font section
44 @section Adding a new font section
46 The font is divided into sections, each of which contains less
47 than 223 glyphs. If more than 223 glyphs are included in a section,
48 an error will be generated.
50 Each of the sections is contained in a separate @code{.mf} file. The
51 files are named according to the type of glyphs in that section.
53 When adding a new section, it will be necessary to add the following:
57 The code for the glyphs, in a file @code{<section-name>.mf}
59 Driver files used to create the font in different sizes
61 An entry in the generic file used to create the font, or a new
64 If necessary, new entries in the GNUmakefile
67 See the examples in @code{mf/} for more information.
69 @node Adding a new glyph
70 @section Adding a new glyph
72 Adding a new glyph is done by modifying the .mf file to which the
75 Necessary functions to draw the glyph can be added anywhere in the file,
76 but it is standard to put them immediately before the glyph definition.
78 The glyph definition begins with:
81 fet_beginchar ("glyph description", "glyphname");
85 with @code{glyph description} replaced with a short description of the
86 glyph, and @code{glyphname} replaced with the glyphname, which is chosen
87 to comply with the naming rules in @file{mf/README}.
89 The metafont code used to draw the glyph follows the @code{fet_beginchar}
90 entry. The glyph is finished with:
96 @node Building the changed font
97 @section Building the changed font
99 In order to rebuild the font after making the changes, the existing
100 font files must be deleted. The simplest and quickest way to do this