README 3.3 KB

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