summaryrefslogtreecommitdiff
path: root/mf/feta-macros.mf
diff options
context:
space:
mode:
authorJanek Warchoł <lemniskata.bernoullego@gmail.com>2013-12-06 17:45:59 +0100
committerBenkő Pál <benko.pal@gmail.com>2013-12-19 17:34:12 +0100
commitd178ef82270a4fce341602a5469f1505b1720ec7 (patch)
treea3022b9dbcdc4768e9f0ddb1f1f76b1e0a0ca177 /mf/feta-macros.mf
parent4d370c0ffa938be9177455bef0e324846bd0fea9 (diff)
font: clean up staffline-display in testing mode
Previous testing code was a mix of hideous copy&paste with non-obvious passing glyph outlines around, which attempted to produce additional glyphs in testing mode, so that there would be both on-staffline and on-staffspace variations. That code was completely unreadable and unmaintainable. Instead i've introduced a global variable that determines how the stafflines will be printed relative to the glyphs. To see alternative configuration, just change that value.
Diffstat (limited to 'mf/feta-macros.mf')
-rw-r--r--mf/feta-macros.mf8
1 files changed, 5 insertions, 3 deletions
diff --git a/mf/feta-macros.mf b/mf/feta-macros.mf
index 9d8d697108..9a695225fb 100644
--- a/mf/feta-macros.mf
+++ b/mf/feta-macros.mf
@@ -21,6 +21,8 @@
% debugging
%
+input debugging-settings.mf
+
def print_penpos (suffix $) =
message
"z" & str$ & "l = (" & decimal x.$.l & ", " &decimal y.$.l & ");"
@@ -50,15 +52,15 @@ def treq =
enddef;
-def draw_staff_if_debugging (expr first, last, offset) =
+def draw_staff_if_debugging (expr first, last) =
if test <> 0:
pickup pencircle scaled stafflinethickness;
for i := first step 1 until last:
draw (-staff_space,
- (i + offset) * staff_space_rounded)
+ (i + stafflines_y_offset) * staff_space_rounded)
-- (4 staff_space,
- (i + offset) * staff_space_rounded);
+ (i + stafflines_y_offset) * staff_space_rounded);
endfor;
fi;
enddef;