1README for ppedit
2
3Raph Levien
44 May 2007
5
6ppedit is my prototype application for editing curves using my
7curvature-continuous spirals. While I have used this code to draw many
8font outlines, it is very rough around the edges, and is far from a
9polished tool.
10
11
12== License and patent grant ==
13
14All code in this package is released under the terms of the GNU GPL,
15version 2 or later, at your choice.
16
17Further, there is a provisional patent application filed for the
18underlying curve technology. The following patent grant applies to any
19patent which may be issued as a result of that application:
20
21Whereas, Raph Levien (hereinafter "Inventor") has obtained patent
22protection for related technology (hereinafter "Patented Technology"),
23Inventor wishes to aid the the GNU free software project in achieving
24its goals, and Inventor also wishes to increase public awareness of
25Patented Technology, Inventor hereby grants a fully paid up,
26nonexclusive, irrevocable, royalty free license to practice the
27patents listed below ("the Patents") if and only if practiced in
28conjunction with software distributed under the terms of any version
29of the GNU General Public License as published by the Free Software
30Foundation, 59 Temple Place, Suite 330, Boston, MA 02111. Inventor
31reserves all other rights, including without limitation, licensing for
32software not distributed under the GNU General Public License.
33
34== Building ==
35
36The main build supported right now is the Gtk2/cairo one. There's also
37a Mac build and a Gtk1 one, but those aren't guaranteed to work.
38
391. Make sure you've got ../x3/ in a directory parallel to ppedit. If
40   you've unpacked from a tarball, this should be the case already.
41   From darcs, use: darcs get http://levien.com/garden/x3
42
432. make
44
453. The binary is ppedit
46
47== Using ==
48
49The numeric keys 1-6 select the mode. 1 is selection, 2-6 select
50different point modes:
51
522: Add G4-continuous curve point
533: Add corner point
544: Add left-facing one-way point
555: Add right-facing one-way point
566: Add G2-continuous curve point
57
58Note: Dave Crossland has a set of alternate keybindings which are
59probably faster.
60
61== Plate files ==
62
63Ctrl-S saves a plate file in a file of the name 'plate'. Additionally,
64a plate file can be given as a command line argument. The file uses
65simple S-expressions, with a one-character code for each point, then
66the X and Y coordinates - 0,0 is top left.
67
68Here's the cap U from Inconsolata, for example:
69
70(plate
71  (v 68 78)
72  (v 159 78)
73  (o 158 92)
74  ([ 148 115)
75  (] 148 552)
76  (o 298 744)
77  ([ 459 549)
78  (v 459 78)
79  (v 536 78)
80  (] 536 547)
81  (o 295 813)
82  ([ 68 551)
83  (z)
84)
85
86v: corner
87o: g4
88c: g2
89[: left-facing one-way
90]: right-facing one-way
91
92== Conversion to PostScript ==
93
94Ctrl-P converts to PostScript, saving '/tmp/foo.ps'. Other utilities
95can convert that representation into FontForge, and also optimize the
96Beziers.
97
98== Stability ==
99
100The spline solver in this release is _not_ numerically robust. When
101you start drawing random points, you'll quickly run into divergence.
102However, "sensible" plates based on real fonts usually converge. Some
103tips:
104
1051. Huge changes of angle are likely to diverge.
106
1072. For the first two or three points, G4 points are likelier to
108   converge than G2's. For longer segments, G2 is more likely.
109
1103. Start on a curve point.
111
112A more numerically robust approach is in the works.
113