| 1 |
README for ppedit |
| 2 |
|
| 3 |
Raph Levien |
| 4 |
4 May 2007 |
| 5 |
|
| 6 |
ppedit is my prototype application for editing curves using my |
| 7 |
curvature-continuous spirals. While I have used this code to draw many |
| 8 |
font outlines, it is very rough around the edges, and is far from a |
| 9 |
polished tool. |
| 10 |
|
| 11 |
|
| 12 |
== License and patent grant == |
| 13 |
|
| 14 |
All code in this package is released under the terms of the GNU GPL, |
| 15 |
version 2 or later, at your choice. |
| 16 |
|
| 17 |
Further, there is a provisional patent application filed for the |
| 18 |
underlying curve technology. The following patent grant applies to any |
| 19 |
patent which may be issued as a result of that application: |
| 20 |
|
| 21 |
Whereas, Raph Levien (hereinafter "Inventor") has obtained patent |
| 22 |
protection for related technology (hereinafter "Patented Technology"), |
| 23 |
Inventor wishes to aid the the GNU free software project in achieving |
| 24 |
its goals, and Inventor also wishes to increase public awareness of |
| 25 |
Patented Technology, Inventor hereby grants a fully paid up, |
| 26 |
nonexclusive, irrevocable, royalty free license to practice the |
| 27 |
patents listed below ("the Patents") if and only if practiced in |
| 28 |
conjunction with software distributed under the terms of any version |
| 29 |
of the GNU General Public License as published by the Free Software |
| 30 |
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111. Inventor |
| 31 |
reserves all other rights, including without limitation, licensing for |
| 32 |
software not distributed under the GNU General Public License. |
| 33 |
|
| 34 |
== Building == |
| 35 |
|
| 36 |
The main build supported right now is the Gtk2/cairo one. There's also |
| 37 |
a Mac build and a Gtk1 one, but those aren't guaranteed to work. |
| 38 |
|
| 39 |
1. 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 |
|
| 43 |
2. make |
| 44 |
|
| 45 |
3. The binary is ppedit |
| 46 |
|
| 47 |
== Using == |
| 48 |
|
| 49 |
The numeric keys 1-6 select the mode. 1 is selection, 2-6 select |
| 50 |
different point modes: |
| 51 |
|
| 52 |
2: Add G4-continuous curve point |
| 53 |
3: Add corner point |
| 54 |
4: Add left-facing one-way point |
| 55 |
5: Add right-facing one-way point |
| 56 |
6: Add G2-continuous curve point |
| 57 |
|
| 58 |
Note: Dave Crossland has a set of alternate keybindings which are |
| 59 |
probably faster. |
| 60 |
|
| 61 |
== Plate files == |
| 62 |
|
| 63 |
Ctrl-S saves a plate file in a file of the name 'plate'. Additionally, |
| 64 |
a plate file can be given as a command line argument. The file uses |
| 65 |
simple S-expressions, with a one-character code for each point, then |
| 66 |
the X and Y coordinates - 0,0 is top left. |
| 67 |
|
| 68 |
Here'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 |
|
| 86 |
v: corner |
| 87 |
o: g4 |
| 88 |
c: g2 |
| 89 |
[: left-facing one-way |
| 90 |
]: right-facing one-way |
| 91 |
|
| 92 |
== Conversion to PostScript == |
| 93 |
|
| 94 |
Ctrl-P converts to PostScript, saving '/tmp/foo.ps'. Other utilities |
| 95 |
can convert that representation into FontForge, and also optimize the |
| 96 |
Beziers. |
| 97 |
|
| 98 |
== Stability == |
| 99 |
|
| 100 |
The spline solver in this release is _not_ numerically robust. When |
| 101 |
you start drawing random points, you'll quickly run into divergence. |
| 102 |
However, "sensible" plates based on real fonts usually converge. Some |
| 103 |
tips: |
| 104 |
|
| 105 |
1. Huge changes of angle are likely to diverge. |
| 106 |
|
| 107 |
2. 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 |
|
| 110 |
3. Start on a curve point. |
| 111 |
|
| 112 |
A more numerically robust approach is in the works. |