]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/automated-engraving/implementing-typography.itexi
Doc: automated-engraving: tweaks. Fixes menu structure and appearance.
[lilypond.git] / Documentation / automated-engraving / implementing-typography.itexi
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @ignore
3     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
4
5     When revising a translation, copy the HEAD committish of the
6     version that you are working on.  See TRANSLATION for details.
7 @end ignore
8
9
10
11
12 @node implementing-typography 
13
14
15 @unnumberedsec Implementing typography
16
17 How do we go about implementing typography?  Answering the "music
18 notation" problem left us with a bunch of graphic objects
19 representing note heads, the staff, stems, etc.
20
21 If craftsmen need over ten years to become true masters, how could we
22 simple hackers ever write a program to take over their jobs?
23
24 The answer is: we cannot!  Since typography relies on human judgement
25 of appearance, people cannot be replaced. However, much of their dull
26 work can be automated: if LilyPond solves most of the common
27 situations correctly, then this will be a huge improvement over
28 existing software. The remaining cases can be tuned by hand.
29 Over the course of years, the software can be refined to do
30 more and more automatically, so manual overrides are necessary less
31 and less.
32
33 How do we go about building such a system?  When we started, we wrote
34 the program in C++. Essentially, this means that the program
35 functionality is set in stone by us developers. That proved to be
36 unsatisfactory:
37
38 @itemize
39 @item
40  If things must be tuned by hand, then the user must access to the
41   formatting engine. Hence, rules and settings cannot be fixed at
42   compile time, but they must be accessible at run-time.
43
44
45 @item
46  Engraving is a matter of visual judgement, and hence it is a
47   matter of taste. As knowledgeable as we are, users can disagree with
48   our personal decision. Therefore, the definitions of typographical
49   style must also be accessible to the user.
50
51
52 @item
53  Finally, we continually refine the formatting algorithms, so we
54  need a flexible approach to rules.  The C++ language forces a certain
55  method of grouping rules that does not match how music notation works.
56
57
58 @end itemize
59
60 Clearly, there is a need for a flexible architecture. The architecture
61 should encompass formatting rules, typographical style and individual
62 formatting decisions.
63
64 @divClass{float-right}
65 Next: @ref{formatting-architecture,Program architecture,
66 your flexible friend}: tuning, tweaking and developing  typography
67 rules.