Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1464)

Side by Side Diff: mf/feta-noteheads.mf

Issue 45160043: Cleanup of ugly MI and SOL shaped noteheads (Closed)
Patch Set: Created 11 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 % Feta (not the Font-En-Tja) music font -- implement noteheads 1 % Feta (not the Font-En-Tja) music font -- implement noteheads
2 % This file is part of LilyPond, the GNU music typesetter. 2 % This file is part of LilyPond, the GNU music typesetter.
3 % 3 %
4 % Copyright (C) 1997--2012 Jan Nieuwenhuizen <janneke@gnu.org> 4 % Copyright (C) 1997--2012 Jan Nieuwenhuizen <janneke@gnu.org>
5 % & Han-Wen Nienhuys <hanwen@xs4all.nl> 5 % & Han-Wen Nienhuys <hanwen@xs4all.nl>
6 % & Juergen Reuter <reuter@ipd.uka.de> 6 % & Juergen Reuter <reuter@ipd.uka.de>
7 % 7 %
8 % The LilyPond font is free software: you can redistribute it and/or modify 8 % The LilyPond font is free software: you can redistribute it and/or modify
9 % it under the terms of the GNU General Public License as published by 9 % it under the terms of the GNU General Public License as published by
10 % the Free Software Foundation, either version 3 of the License, or 10 % the Free Software Foundation, either version 3 of the License, or
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 .. rt z3 {up} 1215 .. rt z3 {up}
1216 .. (z3 + se_dist){-se} 1216 .. (z3 + se_dist){-se}
1217 -- (z4 + se_dist){-se} 1217 -- (z4 + se_dist){-se}
1218 .. top z4 {left} 1218 .. top z4 {left}
1219 .. (z4 + ne_dist){-ne} 1219 .. (z4 + ne_dist){-ne}
1220 -- (z1 + ne_dist){-ne} 1220 -- (z1 + ne_dist){-ne}
1221 .. cycle; 1221 .. cycle;
1222 enddef; 1222 enddef;
1223 1223
1224 1224
1225 save mi_weight, mi_width; 1225 save mi_weight;
1226 mi_weight := 2; 1226 mi_weight := 2;
1227 mi_width := 1.2;
1228 1227
1229 fet_beginchar ("Whole mihead", "s0mi"); 1228 fet_beginchar ("Whole mihead", "s0mi");
1230 » draw_mi_head (mi_width * solfa_whole_width, mi_weight, false); 1229 » draw_mi_head (solfa_whole_width, mi_weight, false);
1231 fill path_out; 1230 fill path_out;
1232 unfill path_in; 1231 unfill path_in;
1233 fet_endchar; 1232 fet_endchar;
1234 1233
1235 1234
1236 fet_beginchar ("Half mihead", "s1mi"); 1235 fet_beginchar ("Half mihead", "s1mi");
1237 » draw_mi_head (mi_width * solfa_quarter_width, mi_weight, false); 1236 » draw_mi_head (solfa_quarter_width, mi_weight, false);
1238 fill path_out; 1237 fill path_out;
1239 unfill path_in; 1238 unfill path_in;
1240 fet_endchar; 1239 fet_endchar;
1241 1240
1242 1241
1243 fet_beginchar ("Quarter mihead", "s2mi"); 1242 fet_beginchar ("Quarter mihead", "s2mi");
1244 » draw_mi_head (mi_width * solfa_quarter_width, mi_weight, false); 1243 » draw_mi_head (solfa_quarter_width, mi_weight, false);
1245 fill path_out; 1244 fill path_out;
1246 fet_endchar; 1245 fet_endchar;
1247 1246
1248 1247
1249 fet_beginchar ("Whole mirror mihead", "s0miMirror"); 1248 fet_beginchar ("Whole mirror mihead", "s0miMirror");
1250 » draw_mi_head (mi_width * solfa_whole_width, mi_weight, true); 1249 » draw_mi_head (solfa_whole_width, mi_weight, true);
1251 fill path_out; 1250 fill path_out;
1252 unfill path_in; 1251 unfill path_in;
1253 fet_endchar; 1252 fet_endchar;
1254 1253
1255 1254
1256 fet_beginchar ("Half mirror mihead", "s1miMirror"); 1255 fet_beginchar ("Half mirror mihead", "s1miMirror");
1257 » draw_mi_head (mi_width * solfa_quarter_width, mi_weight, true); 1256 » draw_mi_head (solfa_quarter_width, mi_weight, true);
1258 fill path_out; 1257 fill path_out;
1259 unfill path_in; 1258 unfill path_in;
1260 fet_endchar; 1259 fet_endchar;
1261 1260
1262 1261
1263 fet_beginchar ("Quarter mirror mihead", "s2miMirror"); 1262 fet_beginchar ("Quarter mirror mihead", "s2miMirror");
1264 » draw_mi_head (mi_width * solfa_quarter_width, mi_weight, true); 1263 » draw_mi_head (solfa_quarter_width, mi_weight, true);
1265 fill path_out; 1264 fill path_out;
1266 fet_endchar; 1265 fet_endchar;
1267 1266
1268 1267
1269 fet_beginchar ("Whole thin mihead", "s0miThin"); 1268 fet_beginchar ("Whole thin mihead", "s0miThin");
1270 » draw_mi_head (mi_width * solfa_whole_width, 1, false); 1269 » draw_mi_head (solfa_whole_width, 1, false);
1271 fill path_out; 1270 fill path_out;
1272 unfill path_in; 1271 unfill path_in;
1273 fet_endchar; 1272 fet_endchar;
1274 1273
1275 1274
1276 fet_beginchar ("Half thin mihead", "s1miThin"); 1275 fet_beginchar ("Half thin mihead", "s1miThin");
1277 » draw_mi_head (mi_width * solfa_quarter_width, 1, false); 1276 » draw_mi_head (solfa_quarter_width, 1, false);
1278 fill path_out; 1277 fill path_out;
1279 unfill path_in; 1278 unfill path_in;
1280 fet_endchar; 1279 fet_endchar;
1281 1280
1282 1281
1283 fet_beginchar ("Quarter thin mihead", "s2miThin"); 1282 fet_beginchar ("Quarter thin mihead", "s2miThin");
1284 » draw_mi_head (mi_width * solfa_quarter_width, 1, false); 1283 » draw_mi_head (solfa_quarter_width, 1, false);
1285 fill path_out; 1284 fill path_out;
1286 fet_endchar; 1285 fet_endchar;
1287 1286
1288 1287
1289 %%%% fa head 1288 %%%% fa head
1290 % 1289 %
1291 % Right triangle, hypotenuse from nw to se corner. Stem attaches on 1290 % Right triangle, hypotenuse from nw to se corner. Stem attaches on
1292 % vertical side in direction of horizontal side. 1291 % vertical side in direction of horizontal side.
1293 % 1292 %
1294 def draw_fa_head (expr width_factor, thickness_factor) = 1293 def draw_fa_head (expr width_factor, thickness_factor) =
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 1438
1440 1439
1441 1440
1442 %%%% sol head 1441 %%%% sol head
1443 % 1442 %
1444 % Note: sol head is the same shape as a standard music head, and doesn't 1443 % Note: sol head is the same shape as a standard music head, and doesn't
1445 % vary from style to style. However, width is constant with duration, 1444 % vary from style to style. However, width is constant with duration,
1446 % so we can't just use the standard note font. 1445 % so we can't just use the standard note font.
1447 % 1446 %
1448 def draw_sol_head (expr filled) = 1447 def draw_sol_head (expr filled) =
1449 » draw_outside_ellipse (1.53 - puff_up_factor / 3.0, 34, 0.66, 0.17); 1448 » draw_outside_ellipse (1.49 - puff_up_factor / 3.0, 31, 0.707, 0);
1450 if not filled: 1449 if not filled:
1451 » undraw_inside_ellipse (3.25, 33, 0.81, 2.5 stafflinethickness#); 1450 » undraw_inside_ellipse (2.5 - puff_up_factor / 3.0, 31, 0.707, 3.5 staf flinethickness#);
lemzwerg 2013/12/24 00:57:53 Please stay in the 80-char-per-line limit.
Carl P. 2013/12/24 01:04:19 Does MF allow for line wrapping inside the functio
1452 fi 1451 fi
1453 draw_staff_if_debugging (-2, 2); 1452 draw_staff_if_debugging (-2, 2);
1454 enddef; 1453 enddef;
1455 1454
1456 fet_beginchar ("Whole solhead", "s0sol"); 1455 fet_beginchar ("Whole solhead", "s0sol");
1457 draw_sol_head ( false); 1456 draw_sol_head ( false);
1458 fet_endchar; 1457 fet_endchar;
1459 1458
1460 1459
1461 fet_beginchar ("Half solhead", "s1sol"); 1460 fet_beginchar ("Half solhead", "s1sol");
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
1959 fet_beginchar ("Quarter down Funk rehead", "d2reFunk"); 1958 fet_beginchar ("Quarter down Funk rehead", "d2reFunk");
1960 draw_Funk_re_head (funk_notehead_width, funk_re_weight); 1959 draw_Funk_re_head (funk_notehead_width, funk_re_weight);
1961 fill p_down_out; 1960 fill p_down_out;
1962 fet_endchar; 1961 fet_endchar;
1963 1962
1964 1963
1965 %%%%%% Funk mi head 1964 %%%%%% Funk mi head
1966 % Diamond shape 1965 % Diamond shape
1967 % Has up and down shapes for all hollow notes 1966 % Has up and down shapes for all hollow notes
1968 % 1967 %
1969 save funk_mi_width, funk_mi_weight; 1968 save funk_mi_weight;
1970 funk_mi_width := 1.2;
1971 funk_mi_weight := 1.9; 1969 funk_mi_weight := 1.9;
1972 1970
1973 fet_beginchar ("Whole up Funk mihead", "u0miFunk"); 1971 fet_beginchar ("Whole up Funk mihead", "u0miFunk");
1974 » draw_mi_head (funk_mi_width * funk_notehead_width, 1972 » draw_mi_head (funk_notehead_width,
1975 funk_mi_weight, false); 1973 funk_mi_weight, false);
1976 fill path_out; 1974 fill path_out;
1977 unfill path_in; 1975 unfill path_in;
1978 fet_endchar; 1976 fet_endchar;
1979 1977
1980 1978
1981 fet_beginchar ("Whole down Funk mihead", "d0miFunk"); 1979 fet_beginchar ("Whole down Funk mihead", "d0miFunk");
1982 » draw_mi_head (funk_mi_width * funk_notehead_width, 1980 » draw_mi_head (funk_notehead_width,
1983 funk_mi_weight, true); 1981 funk_mi_weight, true);
1984 fill path_out; 1982 fill path_out;
1985 unfill path_in; 1983 unfill path_in;
1986 fet_endchar; 1984 fet_endchar;
1987 1985
1988 1986
1989 fet_beginchar ("Half up Funk mihead", "u1miFunk"); 1987 fet_beginchar ("Half up Funk mihead", "u1miFunk");
1990 » draw_mi_head (funk_mi_width * funk_notehead_width, 1988 » draw_mi_head (funk_notehead_width,
1991 funk_mi_weight, false); 1989 funk_mi_weight, false);
1992 fill path_out; 1990 fill path_out;
1993 unfill path_in; 1991 unfill path_in;
1994 fet_endchar; 1992 fet_endchar;
1995 1993
1996 1994
1997 fet_beginchar ("Half down Funk mihead", "d1miFunk"); 1995 fet_beginchar ("Half down Funk mihead", "d1miFunk");
1998 » draw_mi_head (funk_mi_width * funk_notehead_width, 1996 » draw_mi_head (funk_notehead_width,
1999 funk_mi_weight, true); 1997 funk_mi_weight, true);
2000 fill path_out; 1998 fill path_out;
2001 unfill path_in; 1999 unfill path_in;
2002 fet_endchar; 2000 fet_endchar;
2003 2001
2004 2002
2005 fet_beginchar ("Quarter Funk mihead", "s2miFunk"); 2003 fet_beginchar ("Quarter Funk mihead", "s2miFunk");
2006 » draw_mi_head (funk_mi_width * funk_notehead_width, 2004 » draw_mi_head (funk_notehead_width,
2007 funk_mi_weight, false); 2005 funk_mi_weight, false);
2008 fill path_out; 2006 fill path_out;
2009 fet_endchar; 2007 fet_endchar;
2010 2008
2011 2009
2012 %%%%%% Funk fa 2010 %%%%%% Funk fa
2013 % Triangle shape 2011 % Triangle shape
2014 % Does it rotate for whole notes? 2012 % Does it rotate for whole notes?
2015 % Same as other shape note systems 2013 % Same as other shape note systems
2016 % Need special notes because of special width 2014 % Need special notes because of special width
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
2504 draw_Walker_re_head (funk_notehead_width, walker_re_weight); 2502 draw_Walker_re_head (funk_notehead_width, walker_re_weight);
2505 fill p_down_out; 2503 fill p_down_out;
2506 fet_endchar; 2504 fet_endchar;
2507 2505
2508 2506
2509 %%%%%% Walker mi head 2507 %%%%%% Walker mi head
2510 % Diamond shape 2508 % Diamond shape
2511 % Symmetric for all hollow notes 2509 % Symmetric for all hollow notes
2512 % 2510 %
2513 save walker_mi_width, walker_mi_weight; 2511 save walker_mi_width, walker_mi_weight;
2514 walker_mi_width := 1.2; 2512 walker_mi_width := 1;
2515 walker_mi_weight := 1.5; 2513 walker_mi_weight := 1.5;
2516 2514
2517 fet_beginchar ("Whole Walker mihead", "s0miWalker"); 2515 fet_beginchar ("Whole Walker mihead", "s0miWalker");
2518 draw_mi_head (walker_mi_width * funk_notehead_width, 2516 draw_mi_head (walker_mi_width * funk_notehead_width,
2519 walker_mi_weight, true); 2517 walker_mi_weight, true);
2520 fill path_out; 2518 fill path_out;
2521 unfill path_in; 2519 unfill path_in;
2522 fet_endchar; 2520 fet_endchar;
2523 2521
2524 2522
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
2728 2726
2729 % 2727 %
2730 % we derive black_notehead_width# from the quarter head, 2728 % we derive black_notehead_width# from the quarter head,
2731 % so we have to define black_notehead_width (pixel qty) 2729 % so we have to define black_notehead_width (pixel qty)
2732 % after the black_notehead_width# itself. 2730 % after the black_notehead_width# itself.
2733 % 2731 %
2734 % Let's keep it outside the group as well. 2732 % Let's keep it outside the group as well.
2735 % 2733 %
2736 2734
2737 define_pixels (black_notehead_width); 2735 define_pixels (black_notehead_width);
OLDNEW
« Documentation/contributor/source-code.itexi ('K') | « Documentation/contributor/source-code.itexi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b