%% THIS IS METASUPRASL, A METAFONT FOR MEDIEVAL EAST SLAVIC (KIEVAN OR SQUARE) MUSIC NOTATION %% (C) 2011 ALEKSANDR ANDREEV %% %% This is BETA software %% The character codes have been proposed to Unicode and are not final! %% %% COMPILATION INSTRUCTIONS %% %% To produce a font from this source, use mf2pt1. You can download mf2pt1 from here: %% http://www.ctan.org/tex-archive/support/mf2pt1 %% %% To use mf2pt1, you will need MetaPost and FontForge. %% %% NOTE CONCERNING IMPLEMENTATION: %% The font comes in two Flavors: Regular and Notational %% The Regular flavor is used for creating Kievan glyphs in-line (for example, %% in an article, webpage or other piece of text) %% The vertical center of the notehead roughly aligns with the center of the text line. %% %% The Notational flavor is for producing fonts for typesetting music %% Here, the vertical center of the glyph is at zero. %% %% To control the Flavor, change the flavor_regular parameter, below. %% %% In LilyPond, Kievan glyphs are supported natively %% (see this issue: http://codereview.appspot.com/4951062/) %% In other notational software, consult the documentation on how to change the %% font of the music glyphs to Metasuprasl Notational. %% mode_setup; boolean flavor_regular; flavor_regular := false; % or true %% DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW METAFONT!! font_size 10pt#; % design size u#:=3/20pt#; % unit width ht#:=40u#; % the height of the characters o#:=20u#; % the overhang define_corrected_pixels(u); if known ps_output: font_comment "Copyright (c) 2011-2012 Aleksandr Andreev. Based off Suprasl (c) 2009 Joppi Harri. Permission is hereby granted to use, modify and distribute this font under the terms of the GNU General Public License. As a special exception, if you create a document which uses this font, and embed this font or unaltered portions of this font into the document, this font does not by itself cause the resulting document to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the document might be covered by the GNU General Public License. If you modify this font, you may extend this exception to your version of the font, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version."; font_family "Metasuprasl"; font_fixed_pitch false; if flavor_regular = true: font_identifier "Metasuprasl Regular"; font_name "Metasuprasl-Regular"; else: font_identifier "Metasuprasl Notational"; font_name "Metasuprasl-Notational"; fi font_version "1.0.1"; fi transform foo; if flavor_regular = true: foo := identity shifted (0, 20.0u); % for in-line fonts else: foo := identity; % for music notation software fonts fi beginchar("0", 30u#, ht#, o#); % this draws the Final Note % the final note is the last note of a piece of music % equivalent to having a whole note and fermata in CMN % it always has an invariant representation if known ps_output: glyph_name "u1D1E0"; fi x1 = x2 = 30u; y1 = -y2 = 36.4u; y3 = y1; y8 = y2; x3 = x4 = x5 = x6 = x7 = x8 = 26.8u; y4 = -y7 = 24.4u; y5 = -y6 = 5.7u; x9 = x10 = x11 = x12 = 0; y9 = y4; y10 = y5; y11 = y6; y12 = y7; path p; p = z2 -- z8 -- z7 -- z12 -- z11 -- z6 -- z5 -- z10 -- z9 -- z4 -- z3 -- z1 -- cycle; fill p transformed foo; endchar; beginchar("1", 106.8u#, ht#, o#); % this draws the recitative mark if known ps_output: glyph_name "u1D1E1"; fi x1 = x2 = 100.6u; y1 = -y2 = 26.4u; y3 = -y6 = y1; y4 = -y5 = 18.9u; x3 = x4 = x5 = x6 = 98.3u; y7 = y3; y8 = y4; y9 = y5; y10 = y6; x7 = x8 = x9 = x10; x7 - x11 = x1 - x3; x11 = x12 = 6.3u; y11 = y7; y12 = y10; path p; p := z1 -- z2 -- z6 -- z5 -- z9 -- z10 -- z12 -- z11 -- z7 -- z8 -- z4 -- z3 -- z1 -- cycle; fill p transformed foo; % hollow out the central part x13 = x14 = x3; x15 = x16 = x7; y4 - y13 = y14 - y5 = 12.8u; y8 - y15 = y16 - y9 = 12.8u; p := z13 -- z14 -- z16 -- z15 -- cycle; unfill p transformed foo; % now draw the two bars on the sides top y17 = y11; top y18 = y1; bot y19 = y10; bot y20 = y2; x18 = x20; x17 = x19; x18 - x1 = x11 - x17 = 4u; pickup pensquare xscaled 1.75u; p := z18 -- z20; draw p transformed foo; p := z17 -- z19; draw p transformed foo; endchar; beginchar("2", 25.6u#, ht#, o#); % this draws the quarter note with the stem down % quarter note with stem down is used for all quarter notes when we are on % third line of staff or above % and sometimes on second line or between second or third line if known ps_output: glyph_name "u1D1E5"; fi x1 = 2.2u; x2 = 16.3u; x3 = 24.2u; y1 = 8.1u; y2 = 9.1u; y3 = 8.9u; x4 = 22u; y4 = -25.8u; x5 = 25u; y5 = -58.6u; x6 = 14.8u; y6 = -63.5u; x7 = 14.3u; y7 = -46.9u; x8 = 17.8u; y8 = -8.5u; x9 = 0.4u; y9 = -9.6u; x10 = 0; y10 = -5.9u; path p; p = z1{dir 8.6} .. z2 .. z3 & z3 .. z4 .. z5 & z5 -- z6 & z6 .. z7 .. z8 & z8{left} .. z9 & z9 .. z10 ... {dir 75}cycle; fill p transformed foo; endchar; beginchar("3", 25.6u#, ht#, o#); % this draws the upside down quarter note % stem up quarter note is always used below the second line of staff % and sometimes on the second line, between the second or third line or on the third line if known ps_output: glyph_name "u1D1E6"; fi x1 = 2.2u; x2 = 16.3u; x3 = 24.2u; y1 = -8.1u; y2 = -9.1u; y3 = -8.9u; x4 = 22u; y4 = 25.8u; x5 = 25u; y5 = 58.6u; x6 = 14.8u; y6 = 63.5u; x7 = 14.3u; y7 = 46.9u; x8 = 17.8u; y8 = 8.5u; x9 = 0.4u; y9 = 9.6u; x10 = 0; y10 = 5.9u; path p; p = z1{dir -6.9} .. z2 .. z3 & z3 .. z4 .. z5 & z5 -- z6 & z6 .. z7 .. z8 & z8{left} .. z9 & z9 .. z10 ... {dir -76.9}cycle; fill p transformed foo; endchar; beginchar("4", 26.5u#, ht#, o#); % this draws the half note with a short tail up and a long tail down % this version of the half note is used on any line of the staff if known ps_output: glyph_name "u1D1E4"; fi z1 = (25.3u, 23.2u); z2 = (23.2u, -3.0u); z3 = (26.0u, -34.2u); z4 = (17.5u, -38.4u); z5 = (16.5u, -17.9u); z6 = (16.8u, -7.8u); z7 = (11.0u, -8.0u); z8 = (0, -6.9u); z9 = (2.1u, 8.6u); z10 = (18.3u, 6.8u); z11 = (22.3u, 22.6u); path p; p = z1 .. z2{down} .. z3 & z3 -- z4 & z4 .. z5{up} .. z6 & z6 .. z7{left} .. z8 & z8 -- z9 & z9 .. {right}z10 & z10{up} .. z11 & z11 -- cycle; fill p transformed foo; endchar; beginchar("5", 26.9u#, ht#, o#); % this draws the half note with a short tail down and a long tail up % this version of the half note is used in any space of the staff if known ps_output: glyph_name "u1D1E3"; fi z1 = (26.3u, 35.0u); z2 = (23.9u, 4.7u); z3 = (26.0u, -24.4u); z4 = (17.5u, -28.7u); z5 = (16.6u, -10.7u); z6 = (16.8u, -7.6u); z7 = (11.0u, -7.9u); z8 = (0, -6.8u); z9 = (2.1u, 8.8u); z10 = (18.3u, 6.9u); z11 = (19.8u, 20.8u); z12 = (23.2u, 34.4u); path p; p = z1 .. z2{down} .. z3 & z3 -- z4 & z4 .. z5{up} .. z6 & z6 .. z7{left} .. z8 & z8 -- z9 & z9 .. z10{right} & z10 .. z11 .. z12 & z12 -- cycle; fill p transformed foo; endchar; beginchar("6", 36.3u#, ht#, o#); % this draws the Tse-Fa-Ut clef % it is a variant alto clef that always occurs on the third line of the staff if known ps_output: glyph_name "u1D1DE"; fi z1 = (27.2u, 13.6u); z2 = (26.1u, -3.0u); z3 = (36.0u, -39.8u); z4 = (24.6u, -55.3u); y5 = y3; x4 - x5 = x3 - x4; z6 = (22.5u, -9.4u); z7 = (0.3u, -11.0u); z8 = (0, -4.1u); z9 = (1.4u, 11.4u); z10 = (24.4u, 9.5u); z11 = (25.1u, 13.6u); path p; p = z1 .. z2{down} .. z3 & z3 -- z4 & z4 -- z5 & z5 .. {up}z6 & z6{left} .. z7 & z7 .. z8{up} .. z9 & z9 .. {right}z10 & z10 .. z11 & z11 -- cycle; fill p transformed foo; endchar; beginchar("7", 22.5u#, ht#, o#); % this draws the dot, actually, a diamond % same function as in CMN % pars for superellipse are right, top, left, bottom if known ps_output: glyph_name "u1D16D"; fi path p; p = superellipse((w, 0), (w/2, 11.1u), (0, 0), (w/2, -11.1u), 0.51); fill p transformed foo; endchar; beginchar("8", 26.9u#, ht#, o#); % this draws the whole note % invariant representation if known ps_output: glyph_name "u1D1E2"; fi y1 = 12.2u; y2 = 25.4u; path p; p := superellipse((w, y1), (w/2, y2), (0, y1), (w/2, y2 - w), 0.51); fill p transformed foo; p := superellipse((w, -y1), (w/2, w - y2), (0, -y1), (w/2, -y2), 0.51); fill p transformed foo; endchar; beginchar("9", 31.2u#, ht#, o#); % this draws the eighth note % this form of the eight note occurs on the third line or higher % and sometimes between the second line and the third line if known ps_output: glyph_name "u1D1E7"; fi z1 = (6.4u, 10.2u); z2 = (25.1u, 6.6u); z3 = (16.3u, -14.8u); z4 = (30.9u, -17.8u); z5 = (25.9u, -49.4u); z6 = (29.1u, -68.6u); z7 = (19.1u, -73.6u); z8 = (18.2u, -63.0u); z9 = (23.1u, -36.0u); z10 = (8.1u, -32.9u); z11 = (15.5u, -11.0u); z12 = (0, -8.2u); path p; p = z1{right} .. z2 & z2 -- z3 & z3{right} .. z4 & z4 .. z5{down} .. z6 & z6 -- z7 & z7 .. z8{up} .. z9 & z9 .. {left}z10 & z10{dir 78.7} .. z11 & z11 .. {left}z12 & z12{dir 78.7} .. {dir 62}cycle; fill p transformed foo; endchar; beginchar("a", 26.6u#, ht#, o#); % this draws the flagged eight note % this version of the eighth note occurs on the second line or lower % first, draw the upside down quarter note if known ps_output: glyph_name "u1D1E8"; fi z1 = (2.2u, -8.1u); z2 = (16.3u, -9.1u); z3 = (24.2u, -8.9u); z4 = (22u, 25.8u); z5 = (25u, 58.6u); z6 = (14.8u, 63.5u); z7 = (14.3u, 46.9u); z8 = (17.8u, 8.5u); z9 = (0.4u, 9.6u); z10 = (0, 5.9u); path p; p := z1{dir -6.9} .. z2 .. z3 & z3 .. z4 .. z5 & z5 -- z6 & z6 .. z7 .. z8 & z8{left} .. z9 & z9 .. z10 ... {dir -76.9}cycle; fill p transformed foo; % now, draw the stem z11 = (0.8u, 69.3u); z12 = (9.6u, 65.0u); z13 = (8.7u, 56.2u); z14 = (16.6u, 26.4u); z15 = (17.0u, 21.6u); z16 = (5.1u, 41.7u); z17 = (0.6u, 64.2u); p := z11 -- z12 & z12 .. z13{down} .. z14 & z14 -- z15 & z15 .. z16 .. z17{up} .. cycle; fill p transformed foo; endchar; % accidentals beginchar("b", 39.7u#, ht#, o#); % this draws the sharp % the sharp never occurs in Synodal music. It can only be found in some early manuscripts if known ps_output: glyph_name "u266f"; fi z1 = (14.2u, 35.8u); z2 = (34.7u, -22.2u); z3 = (4.6u, 22.2u); x2 - x1 = x4 - x3; y1 - y2 = y3 - y4; z5 = (31.8u, 39.6u); z6 = (2.2u, -21.2u); z7 = (37.6u, 21.9u); x5 - x6 = x7 - x8; y5 - y6 = y7 - y8; path p; pickup pensquare xscaled 4.1u yscaled 4.1u rotated -69.2; p := z1{dir -69.2} .. {dir -74.1}z2; draw p transformed foo; p := z3{dir -69.2} .. {dir -74.1}z4; draw p transformed foo; pickup pensquare xscaled 4.1u yscaled 4.1u rotated -114.6; p := z5{dir -114.6} ... {dir -125.0}z6; draw p transformed foo; p := z7{dir -114.6} ... {dir -125.0}z8; draw p transformed foo; endchar; beginchar("c", 22.3u#, ht#, o#); % this draws the flat sign % In Synodal music, the flat only occurs on the high B % but it may be used elsewhere in early manuscripts if known ps_output: glyph_name "u1D1E9"; fi z1 = (11.1u, 43.5u); z2 = (11.8u, 42.6u); z3 = (11.4u, 39.9u); z4 = (6.5u, 7.9u); z5 = (10.6u, -18.7u); z6 = (15.0u, -14.3u); z7 = (15.0u, 5.5u); z8 = (16.0u, 12.6u); z9 = (22.1u, 16.8u); z10 = (21.4u, 15.7u); z11 = (19.9u, 8.8u); z12 = (19.9u, -14.4u); z13 = (8.3u, -26.1u); z14 = (0.4u, 4.8u); z15 = (5.0u, 32.3u); path p; p := z13 .. z14{up} .. z15{dir 70.8} .. z1{dir 4.9} .. z2 .. z3 .. z4{down} .. z5 & z5 -- cycle; fill p transformed foo; p := z5 -- z6 & z6 -- z7 & z7 -- z11 & z11 -- z12 & z12 -- z13 & z13 -- cycle; fill p transformed foo; p := z7{up} .. z8 .. {dir 23}z9 & z9 .. z10{dir -135} .. {down}z11 & z11 -- cycle; fill p transformed foo; endchar; beginchar("d", 40.6u#, ht#, o#); % this draws the end of piece figure % this figure is placed at the end of the musical piece, after the staff if known ps_output: glyph_name "u1D1DF"; fi transform bar; if flavor_regular = true: bar := identity shifted (0, -30.0u); else: bar = foo; fi z1 = (28.3u, 91.2u); z2 = (9.5u, -10.2u); pickup pensquare xscaled 3.2u; path p; p := z1 -- z2; draw p transformed bar; z3 = (8.0u, -10.2u); z4 = (10.4u, -12.8u); z5 = (31.8u, 17.0u); z6 = (20.4u, 49.9u); z7 = (9.1u, 84.7u); z8 = (26.5u, 107.1u); z9 = (38.3u, 103.1u); z10 = (w, 105.3u); z11 = (26.9u, 111.3u); z12 = (0, 78.8u); z13 = (4.7u, 57.7u); z14 = (15.1u, 38.8u); z15 = (23.9u, 13.3u); z16 = (11.8u, -9.1u); p := z3 .. z4{right} .. z5{up} .. z6 .. z7{up} .. z8{right} .. z9{right} .. z10{up} .. z11{left} .. z12{down} .. z13 .. z14 .. z15{down} .. z16 .. cycle; fill p transformed bar; endchar; beginchar("e", 51.2u#, ht#, o#); % This draws the beamed quarter note ligature, stems down if known ps_output: glyph_name "u1d1e5.lig"; fi z1 = (2.2u, 8.1u); z2 = (16.3u, 9.1u); z3 = (24.2u, 8.9u); z4 = (22u, -25.8u); z5 = (25u, -58.6u); z6 = (14.8u, -63.5u); z7 = (14.3u, -46.9u); z8 = (17.8u, -8.5u); z9 = (0.4u, -9.6u); z10 = (0, -5.9u); path p; p := z1{dir 8.6} .. z2 .. z3 & z3 .. z4 .. z5 & z5 -- z6 & z6 .. z7 .. z8 & z8{left} .. z9 & z9 .. z10 ... {dir 75}cycle; fill p transformed foo; transform t; t = identity shifted (30.25u, 0); fill p transformed t transformed foo; z11 = z6 shifted (1.25u, 8.25u); z12 = z6 transformed t shifted (8.25u, 14.25u); pickup pensquare yscaled 6u; p := z11 -- z12; draw p transformed foo; endchar; beginchar("f", 51.2u#, ht#, o#); % This draws the beamed quarter note ligature, stems up if known ps_output: glyph_name "u1d1e6.lig"; fi z1 = (2.2u, -8.1u); z2 = (16.3u, -9.1u); z3 = (24.2u, -8.9u); z4 = (22u, 25.8u); z5 = (25u, 58.6u); z6 = (14.8u, 63.5u); z7 = (14.3u, 46.9u); z8 = (17.8u, 8.5u); z9 = (0.4u, 9.6u); z10 = (0, 5.9u); path p; p := z1{dir -6.9} .. z2 .. z3 & z3 .. z4 .. z5 & z5 -- z6 & z6 .. z7 .. z8 & z8{left} .. z9 & z9 .. z10 ... {dir -76.9}cycle; fill p transformed foo; transform t; t = identity shifted (30.25u, 0); fill p transformed t transformed foo; z11 = z6 shifted (1.25u, -8.25u); z12 = z6 transformed t shifted (8.25u, -14.25u); pickup pensquare yscaled 6u; p := z11 -- z12; draw p transformed foo; endchar; beginchar("g", 0.0, ht#, o#); %% CONTROL CHAR: MUSICAL SYMBOL BEGIN BEAM if known ps_output: glyph_name "u1d173"; fi endchar; beginchar("h", 0.0, ht#, o#); %% CONTROL CHAR: MUSICAL SYMBOL END BEAM if known ps_output: glyph_name "u1d174"; fi endchar; beginchar("i", 25.6u#, ht#, o#); %% SPACE if known ps_output: glyph_name "u0020"; fi endchar; end