lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

font: rewrite accidental code (sharp and natural) (issue 38720043)


From: janek . lilypond
Subject: font: rewrite accidental code (sharp and natural) (issue 38720043)
Date: Sat, 07 Dec 2013 09:31:06 +0000

Reviewers: wl_gnu.org, hanwenn,

Message:
Please review my changes to accidentals metafont code.

A warning: this patch applies to
https://codereview.appspot.com/38530043/ (not master).

See it on branch dev/janek/metafont-accidentals-rewrite

thanks,
Janek

Description:
font: rewrite accidental code (sharp and natural)


contains 2 commits:


font: parametrize and cleanup sharp code

Changes:
* as much as possible is controlled by global parameters,
* variables have more consistent names,
* the functions are more consistently structured,
* stem ends are placed in one line using explicit beam direction.

The glyphs remain identical.

It would be good to extract one global procedure that would draw
all needed sharps (instead of having 6 similar ones), but i didn't
have enough time to do this.



font: rewrite and parametrize natural code

The logic remains virtually the same. List of changes:
* more descriptive variable names,
* removed surplus points (1', 3', 11', 21'),
* stem brushing is controlled in a simpler way,
* beam slant does no longer depend on stem thickness,
* all dimensions are explicitely and straightforwardly
  derived from global parameters.  This makes it trivial
  to get a differently-looking natural by just changing
  clearly defined values.

At size 20, the natural remains identical.  At signifincantly
different sizes there are a few microscopic changes, but they
are too small to be noticeable:

* stem end thickness is defined in terms of stem thickness,
  so regardless of design size the ratio between them is constant.
* beam slant is slightly more consistent.  But you wouldn't notice
  the change if i haven't told you ;-)

Please review this at https://codereview.appspot.com/38720043/

Affected files (+246, -248 lines):
  M mf/feta-accidentals/naturals.mf
  M mf/feta-accidentals/sharps.mf





reply via email to

[Prev in Thread] Current Thread [Next in Thread]