| 1 |
Creating a glyph using spiros |
| 2 |
============================= |
| 3 |
|
| 4 |
Spiro is the work of `Raph Levien <https://levien.com/spiro/>`_, it |
| 5 |
provides an alternate method of designing a glyph using a set of |
| 6 |
on-curve points rather than the traditional mixture of on and off curve |
| 7 |
points used for bezier splines. |
| 8 |
|
| 9 |
- G4 Curve Points (continuous up to the fourth derivative) |
| 10 |
- G2 Curve Points (continuous up to the second derivative) |
| 11 |
Basically this boils down to: If you have a sharp curve you are |
| 12 |
probably better off using a G2 point, while a more gentle curve would |
| 13 |
call for a G4. |
| 14 |
- Corner Points |
| 15 |
- Prev Constraint points (to be used when the contour changes from a |
| 16 |
curve to a straight line) |spiroprevconstraint| |
| 17 |
- Next Constraint points (to be used when the contour changes from a |
| 18 |
straight line to a curve) |spironextconstraint| |
| 19 |
|
| 20 |
.. |spiroprevconstraint| image:: /images/spiroprevconstraint.png |
| 21 |
.. |spironextconstraint| image:: /images/spironextconstraint.png |
| 22 |
|
| 23 |
|
| 24 |
Step 1 |
| 25 |
****** |
| 26 |
|
| 27 |
As before let us try to edit the "C" glyph from Ambrosia. |
| 28 |
|
| 29 |
.. figure:: /images/Cspiro0.png |
| 30 |
|
| 31 |
Again we start with a blank glyph. Note that there is a button in the |
| 32 |
shape of a spiral in the tool pane. If you press this button you go |
| 33 |
into spiro mode, and the tools available to you change slightly. |
| 34 |
|
| 35 |
(If you press the button again you go back to Bezier mode) |
| 36 |
|
| 37 |
Again use File->Import to import a background image and then scale it |
| 38 |
properly. (If you don't know how this is done, look at the |
| 39 |
:ref:`previous page <editexample.Import>`) |
| 40 |
|
| 41 |
|
| 42 |
Step 2 |
| 43 |
****** |
| 44 |
|
| 45 |
.. figure:: /images/Cspiro1.png |
| 46 |
|
| 47 |
Select the G4 curve point (the tool on the left side of the third row). |
| 48 |
|
| 49 |
G4 curve points have the nice properties that the slope of the splines |
| 50 |
will be the same on either side of them, and the curvature of the splines |
| 51 |
will be too. |
| 52 |
|
| 53 |
Then move the pointer over the image and click to place a point at a point |
| 54 |
on the edge of the bitmap image. |
| 55 |
|
| 56 |
Step 3 |
| 57 |
****** |
| 58 |
|
| 59 |
.. figure:: /images/Cspiro2.png |
| 60 |
|
| 61 |
Select the "next constraint" point which changes the contour nicely from a |
| 62 |
curve to a straight line. |
| 63 |
|
| 64 |
If you pick the wrong constraint (and I often do -- it will become obvious |
| 65 |
later when the contour looks distorted here), then select the constraint |
| 66 |
point and use :ref:`Element->Get Info <getinfo.Spiro>` to change the |
| 67 |
point type -- or use the :doc:`Point menu </ui/menus/pointmenu>`. |
| 68 |
|
| 69 |
Step 4 |
| 70 |
****** |
| 71 |
|
| 72 |
.. figure:: /images/Cspiro3.png |
| 73 |
|
| 74 |
Now select the corner point from the tool menu (the one that looks like a square). |
| 75 |
|
| 76 |
Place it at a location where the slope changes abruptly -- a corner. |
| 77 |
|
| 78 |
We are now ready to talk about the "left tangent point". Pretend you are |
| 79 |
standing on the corner point, facing toward the tangent point. Is the next |
| 80 |
point after it (in this case the curved point) to your left or to your right? |
| 81 |
If to your left, use a left tangen, if to your right, use a right tangent. |
| 82 |
|
| 83 |
Step 5 |
| 84 |
****** |
| 85 |
|
| 86 |
.. figure:: /images/Cspiro4.png |
| 87 |
|
| 88 |
Now we want to do some fiddly work on the top of the "C". Here we have a serif |
| 89 |
with a slight curve to it between two corners, two abrupt changes of direction. |
| 90 |
|
| 91 |
We need to get a close up view of the image in order to work more precisely, so |
| 92 |
select the magnifying glass tool from the tool pane, move it to the middle of |
| 93 |
the serif, and click it several times until the serif fills the screen. |
| 94 |
|
| 95 |
Step 6 |
| 96 |
****** |
| 97 |
|
| 98 |
.. figure:: /images/Cspiro5.png |
| 99 |
|
| 100 |
Generally a corner point should have a constraint (or another corner) point on |
| 101 |
either side of it, so we need to pick another constraint. In this case the |
| 102 |
contour will change from a straight line to a curve, so that means a "prev |
| 103 |
constraint" point. |
| 104 |
|
| 105 |
Step 7 |
| 106 |
****** |
| 107 |
|
| 108 |
.. figure:: /images/Cspiro6.png |
| 109 |
|
| 110 |
Then proceeding to fill in the other points needed to make for a smooth curve |
| 111 |
of the serif. |
| 112 |
|
| 113 |
Step 8 |
| 114 |
****** |
| 115 |
|
| 116 |
.. figure:: /images/Cspiro6_5.png |
| 117 |
|
| 118 |
And another smooth curve of the other side of the serif. |
| 119 |
|
| 120 |
Step 9 |
| 121 |
****** |
| 122 |
|
| 123 |
.. figure:: /images/Cspiro7.png |
| 124 |
|
| 125 |
Now it is no longer useful to have such a close view of the image, so grab the |
| 126 |
magnifying glass tool again, and hold down the Alt (Meta, Option) key. The |
| 127 |
cursor should change, and clicking it will zoom you out. |
| 128 |
|
| 129 |
Then fill in the remainder of the points on this side. |
| 130 |
|
| 131 |
Step 10 |
| 132 |
******* |
| 133 |
|
| 134 |
.. figure:: /images/Cspiro8.png |
| 135 |
|
| 136 |
As we approach the lower tip of the C we again need to zoom in |
| 137 |
|
| 138 |
Step 11 |
| 139 |
******* |
| 140 |
|
| 141 |
.. figure:: /images/Cspiro9.png |
| 142 |
|
| 143 |
And eventually we have completed a rough outline of the glyph. Clicking on the |
| 144 |
start point will close the curve. |
| 145 |
|
| 146 |
Unfortunately the result isn't quite what we'd hoped. There are some rather |
| 147 |
erratic bulges. |
| 148 |
|
| 149 |
We can fix that by |
| 150 |
|
| 151 |
#. moving points around |
| 152 |
|
| 153 |
Use the pointer tool, click on a point (or hold down the shift key to |
| 154 |
select several points) and then drag them around. |
| 155 |
#. adding new points to the outline. |
| 156 |
|
| 157 |
Using the appropriate spiro tool, depress the mouse somewhere on the |
| 158 |
outline -- a new point appears there. You may now drag this point around. |
| 159 |
|
| 160 |
.. figure:: /images/Cspirals.png |
| 161 |
|
| 162 |
In the process of fixing things we can move a point so far that the spiro |
| 163 |
converter can't make sense of it. All of a sudden our (almost) nice outline |
| 164 |
turns into an erratic spirals. |
| 165 |
|
| 166 |
Don't worry about it, just move the point back and things return to normal. |
| 167 |
If you move the point too far things can get even worse and the outline will |
| 168 |
disappear altogether. Don't worry about that either, just put the point back. |
| 169 |
Or use Edit->Undo. |
| 170 |
|
| 171 |
And enjoy the curious beauty of the spirals you have unintentionally created. |
| 172 |
|
| 173 |
(Raph is working on this, and at some point we may lose the spirals entirely, |
| 174 |
but they have a certain charm -- I'll be sorry to see them go) |
| 175 |
|
| 176 |
.. figure:: /images/Cspiro10.png |