From: James Lowe Date: Mon, 13 Mar 2017 17:40:11 +0000 (+0000) Subject: Doc: Change the name of feta-font.itex to emmentaler.itexi X-Git-Url: https://git.donarmstrong.com/?p=lilypond.git;a=commitdiff_plain;h=74b8ab04113a87125e36ccdf704ce6db16fe4e55 Doc: Change the name of feta-font.itex to emmentaler.itexi Issue 5092 Change the name of the file feta-font.itexi to emmentaler.itexi for consistency. --- diff --git a/Documentation/contributor.texi b/Documentation/contributor.texi index 77b562ee5a..ac485a3962 100644 --- a/Documentation/contributor.texi +++ b/Documentation/contributor.texi @@ -94,7 +94,7 @@ Appendices @include contributor/programming-work.itexi @include contributor/release-work.itexi @include contributor/build-notes.itexi -@include contributor/feta-font.itexi +@include contributor/emmentaler-font.itexi @include contributor/administration.itexi @node LilyPond grammar diff --git a/Documentation/contributor/emmentaler-font.itexi b/Documentation/contributor/emmentaler-font.itexi new file mode 100644 index 0000000000..4c4c81b57f --- /dev/null +++ b/Documentation/contributor/emmentaler-font.itexi @@ -0,0 +1,145 @@ +@c -*- coding: utf-8; mode: texinfo; -*- +@node Modifying the Emmentaler font +@chapter Modifying the Emmentaler font + +@menu +* Overview of the Emmentaler font:: +* Font creation tools:: +* Adding a new font section:: +* Adding a new glyph:: +* Building the changed font:: +* METAFONT formatting rules:: +@end menu + +@node Overview of the Emmentaler font +@section Overview of the Emmentaler font + +Emmentaler was created specifically for use in LilyPond. The font +consists of two @emph{sub-sets} of glyphs. @qq{Feta}, used for clasical +notation and @qq{Parmesan}, used for Ancient notation. The sources of +which are all found in mf/*.mf. + +The font is merged from a number of subfonts. Each subfont can contain +at most 224 glyphs. This is because each subfont is limited to a +one-byte address space (256 glyphs maximum) and we avoid the first 32 +points in that address space, since they are non-printing control +characters in ASCII. + +In LilyPond, glyphs are accessed by a @q{glyph name}, rather than by +code point. Therefore, the name of a glyph is significant. + +Information about correctly creating glyphs is found in @file{mf/README}. +Please make sure you read and understand this file. + +TODO -- we should get mf/README automatically generated from texinfo +source and include it here. + + +@node Font creation tools +@section Font creation tools + +The sources for Emmentaler are written in metafont. The definitive +reference for metafont is "The METAFONT book" -- the source of which is +available at CTAN. + +mf2pt1 is used to create type 1 fonts from the metafont sources. + +FontForge is used to postprocess the output of mf2pt1 and clean up +details of the font. It can also be used by a developer to +display the resulting glyph shapes. + + +@node Adding a new font section +@section Adding a new font section + +The font is divided into sections, each of which contains less +than 224 glyphs. If more than 224 glyphs are included in a section, +an error will be generated. + +Each of the sections is contained in a separate @code{.mf} file. The +files are named according to the type of glyphs in that section. + +When adding a new section, it will be necessary to add the following: + +@itemize +@item +The code for the glyphs, in a file @code{.mf} +@item +Driver files used to create the font in different sizes +@item +An entry in the generic file used to create the font, or a new +generic file +@item +If necessary, new entries in the GNUmakefile +@item +An entry in @file{scripts/build/gen-emmentaler-scripts.py} +@end itemize + +See the examples in @code{mf/} for more information. + + +@node Adding a new glyph +@section Adding a new glyph + +Adding a new glyph is done by modifying the .mf file to which the +glyph will be added. + +Necessary functions to draw the glyph can be added anywhere in the file, +but it is standard to put them immediately before the glyph definition. + +The glyph definition begins with: + +@example +fet_beginchar ("glyph description", "glyphname"); +@end example + +@noindent +with @code{glyph description} replaced with a short description of the +glyph, and @code{glyphname} replaced with the glyphname, which is chosen +to comply with the naming rules in @file{mf/README}. + +The metafont code used to draw the glyph follows the @code{fet_beginchar} +entry. The glyph is finished with: + +@example +fet_endchar; +@end example + + +@node Building the changed font +@section Building the changed font + +In order to rebuild the font after making the changes, the existing +font files must be deleted. The simplest and quickest way to do this +is to do: + +@example +rm mf/out/* +make +@end example + + +@node METAFONT formatting rules +@section METAFONT formatting rules + +There are special formatting rules for METAFONT files. + +Tabs are used for the indentation of commands. + +When a path contains more than two points, put each point on a +separate line, with the operator at the beginning of the line. +The operators are indented to the same depth as the initial point +on the path using spaces. The indentation mechanism is illustrated +below, with @samp{------->} indicating a tab character and any other +indentation created using spaces. + +@example +def draw_something (test) = +------->if test: +------->------->fill z1 +------->-------> -- z2 +------->-------> -- z3 +------->-------> .. cycle; +------->fi; +enddef; +@end example diff --git a/Documentation/contributor/feta-font.itexi b/Documentation/contributor/feta-font.itexi deleted file mode 100644 index 4c4c81b57f..0000000000 --- a/Documentation/contributor/feta-font.itexi +++ /dev/null @@ -1,145 +0,0 @@ -@c -*- coding: utf-8; mode: texinfo; -*- -@node Modifying the Emmentaler font -@chapter Modifying the Emmentaler font - -@menu -* Overview of the Emmentaler font:: -* Font creation tools:: -* Adding a new font section:: -* Adding a new glyph:: -* Building the changed font:: -* METAFONT formatting rules:: -@end menu - -@node Overview of the Emmentaler font -@section Overview of the Emmentaler font - -Emmentaler was created specifically for use in LilyPond. The font -consists of two @emph{sub-sets} of glyphs. @qq{Feta}, used for clasical -notation and @qq{Parmesan}, used for Ancient notation. The sources of -which are all found in mf/*.mf. - -The font is merged from a number of subfonts. Each subfont can contain -at most 224 glyphs. This is because each subfont is limited to a -one-byte address space (256 glyphs maximum) and we avoid the first 32 -points in that address space, since they are non-printing control -characters in ASCII. - -In LilyPond, glyphs are accessed by a @q{glyph name}, rather than by -code point. Therefore, the name of a glyph is significant. - -Information about correctly creating glyphs is found in @file{mf/README}. -Please make sure you read and understand this file. - -TODO -- we should get mf/README automatically generated from texinfo -source and include it here. - - -@node Font creation tools -@section Font creation tools - -The sources for Emmentaler are written in metafont. The definitive -reference for metafont is "The METAFONT book" -- the source of which is -available at CTAN. - -mf2pt1 is used to create type 1 fonts from the metafont sources. - -FontForge is used to postprocess the output of mf2pt1 and clean up -details of the font. It can also be used by a developer to -display the resulting glyph shapes. - - -@node Adding a new font section -@section Adding a new font section - -The font is divided into sections, each of which contains less -than 224 glyphs. If more than 224 glyphs are included in a section, -an error will be generated. - -Each of the sections is contained in a separate @code{.mf} file. The -files are named according to the type of glyphs in that section. - -When adding a new section, it will be necessary to add the following: - -@itemize -@item -The code for the glyphs, in a file @code{.mf} -@item -Driver files used to create the font in different sizes -@item -An entry in the generic file used to create the font, or a new -generic file -@item -If necessary, new entries in the GNUmakefile -@item -An entry in @file{scripts/build/gen-emmentaler-scripts.py} -@end itemize - -See the examples in @code{mf/} for more information. - - -@node Adding a new glyph -@section Adding a new glyph - -Adding a new glyph is done by modifying the .mf file to which the -glyph will be added. - -Necessary functions to draw the glyph can be added anywhere in the file, -but it is standard to put them immediately before the glyph definition. - -The glyph definition begins with: - -@example -fet_beginchar ("glyph description", "glyphname"); -@end example - -@noindent -with @code{glyph description} replaced with a short description of the -glyph, and @code{glyphname} replaced with the glyphname, which is chosen -to comply with the naming rules in @file{mf/README}. - -The metafont code used to draw the glyph follows the @code{fet_beginchar} -entry. The glyph is finished with: - -@example -fet_endchar; -@end example - - -@node Building the changed font -@section Building the changed font - -In order to rebuild the font after making the changes, the existing -font files must be deleted. The simplest and quickest way to do this -is to do: - -@example -rm mf/out/* -make -@end example - - -@node METAFONT formatting rules -@section METAFONT formatting rules - -There are special formatting rules for METAFONT files. - -Tabs are used for the indentation of commands. - -When a path contains more than two points, put each point on a -separate line, with the operator at the beginning of the line. -The operators are indented to the same depth as the initial point -on the path using spaces. The indentation mechanism is illustrated -below, with @samp{------->} indicating a tab character and any other -indentation created using spaces. - -@example -def draw_something (test) = -------->if test: -------->------->fill z1 -------->-------> -- z2 -------->-------> -- z3 -------->-------> .. cycle; -------->fi; -enddef; -@end example