Update to mf/README

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Update to mf/README

Maximilian Albert
Hi,

long ago I promised to add some info to mf/README about how stem
attachments work for lilypond glyphs. Here finally is a patch. Since the
conclusions I drew were derived by trial and error, I may have
misinterpreted or overlooked something. Thus I'd be grateful if one of
the metafont experts could give it a quick review. Also, please feel
free to modify the wording as you like - I keep realizing that in
English I find it difficult to write clearly and concisely at the same.

Thanks,
Max

>From 2fb7170681ad404fc7d2749e413210df4801e24d Mon Sep 17 00:00:00 2001
From: Maximilian Albert <[hidden email]>
Date: Sun, 30 Sep 2007 17:57:58 +0200
Subject: [PATCH] Add info about stem attachments to mf/README

---
 mf/README |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/mf/README b/mf/README
index 89eef4e..6239581 100644
--- a/mf/README
+++ b/mf/README
@@ -77,6 +77,36 @@ Some design rules:
 . Use rounded corners.
 
 
+Hints for stem attachment:
+
+. Stem attachment of glyphs is controlled by two special variables
+  called 'charwx' and 'charwy'. Stems can be regarded as (very oblonged)
+  rectangles with slightly rounded corners. For upward-pointing stems the
+  lower right corner of this rectangle is attached to the glyph at position
+  (charwx, charwy). For downward-pointing stems it works analogously but
+  with the upper left corner, where the position of the attachment point
+  is additionally reflected horizontally about the center of the glyph (this
+  ensures that in most cases charwx and charwy can be set to the same values
+  for up- and down-stems even though these are attached at the right/left end
+  of the note, respectively). To make this more precise, the upper left
+  corner of a down-stem is attached at position (charwd/2 - charwx, charwy),
+  where charwd is an internal metafont variable representing the glyph width
+  as specified by the set_char_box command.
+
+. In case different stem attachments for upward- and downward-pointing stems
+  are needed, two separate glyphs must be defined in the *.mf file (of course
+  this also applies if two entirely different shapes are needed). These have
+  the same name but are prefixed by "u" and "d", respectively (for "up" and
+  "down", obviously). In each of these glyphs the variables charwx and charwy
+  must be set accordingly. If, on the other hand, the attachment point is the
+  "same" for both directions (with the above-mentioned horizontal reflection
+  taken into account) then the prefix "s" (for "symmetric") should be used.
+  See the existing files for examples. The numbers in the glyph names refer to
+  the duration of the note; e.g., "s0cross" in feta-bolletjes.mf defines the
+  notehead for a whole cross-shaped note (similarly, 's1cross' and 's2cross'
+  are for half and quarter notes, respectively).
+
+
 Finally, some rules to assure that rasterization at low resolutions gives
 good results.  Today, this is a minor issue, but in some cases it might show
 design flaws.
--
1.5.3.1


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Update to mf/README

Juergen Reuter
Hi,

by the way, when creating the ancient font many years ago, I added
documentation in a similar vein which is now at the top of the files
parmesan-clefs.mf and parmesan-heads.mf, but is also valid for the feta
font.  I guess this docu could also be moved to the README file.  However,
the docu is very old and possibly partially outdated; so it may have to be
proof-read by someone more qualified/up-to-date than me.

Greetings,
Juergen


On Tue, 2 Oct 2007, Maximilian Albert wrote:

> Hi,
>
> long ago I promised to add some info to mf/README about how stem attachments
> work for lilypond glyphs. Here finally is a patch. Since the conclusions I
> drew were derived by trial and error, I may have misinterpreted or overlooked
> something. Thus I'd be grateful if one of the metafont experts could give it
> a quick review. Also, please feel free to modify the wording as you like - I
> keep realizing that in English I find it difficult to write clearly and
> concisely at the same.
>
> Thanks,
> Max
>


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Update to mf/README

Han-Wen Nienhuys-3
In reply to this post by Maximilian Albert
looks correct to me.

2007/10/1, Maximilian Albert <[hidden email]>:

> Hi,
>
> long ago I promised to add some info to mf/README about how stem
> attachments work for lilypond glyphs. Here finally is a patch. Since the
> conclusions I drew were derived by trial and error, I may have
> misinterpreted or overlooked something. Thus I'd be grateful if one of
> the metafont experts could give it a quick review. Also, please feel
> free to modify the wording as you like - I keep realizing that in
> English I find it difficult to write clearly and concisely at the same.
>
> Thanks,
> Max
>
> _______________________________________________
> lilypond-devel mailing list
> [hidden email]
> http://lists.gnu.org/mailman/listinfo/lilypond-devel
>
>
>


--
Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Update to mf/README

Werner LEMBERG
In reply to this post by Maximilian Albert

> long ago I promised to add some info to mf/README about how stem
> attachments work for lilypond glyphs. Here finally is a patch.
> [...]

Applied, thanks.


    Werner


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel