| 1 |
Importing Outline Glyphs |
| 2 |
======================== |
| 3 |
|
| 4 |
|
| 5 |
You may be more comfortable designing your glyph outlines in some other vector |
| 6 |
design program (Illustrator, FreeHand, Inkscape, what-have-you) and then |
| 7 |
importing it into FontForge. |
| 8 |
|
| 9 |
The last two sections have talked about importing bitmap images and tracing |
| 10 |
around them. This is slightly different. |
| 11 |
|
| 12 |
So design your glyph in your favorite program, and then export it from that |
| 13 |
program into either eps (Encapsulated PostScript) or svg (Scalable Vector |
| 14 |
Graphics). If you use Illustrator or FreeHand you should probably chose "eps" if |
| 15 |
you use Inkscape you probably want to use "svg". |
| 16 |
|
| 17 |
.. image:: /images/emptyfont-A-sel.png |
| 18 |
:align: right |
| 19 |
|
| 20 |
Then in FontForge, open the glyph slot where you want to add the glyph you just |
| 21 |
designed (by double clicking on it), and within that window select |
| 22 |
:menuselection:`File --> Import`. |
| 23 |
|
| 24 |
.. image:: /images/import.png |
| 25 |
:align: left |
| 26 |
|
| 27 |
This will bring up the import dialog, initially it displays all bitmap images. |
| 28 |
Change the Format to EPS or SVG (depending on which you used). Then find the |
| 29 |
glyph you just created and import it. |
| 30 |
|
| 31 |
You should now have the outlines of a glyph in the fontforge editing window. |
| 32 |
|
| 33 |
.. image:: /images/floating-A.png |
| 34 |
:align: right |
| 35 |
|
| 36 |
But it may be the wrong size. It may be at the wrong place. |
| 37 |
|
| 38 |
The example at right is both in the wrong place (the bottom part of the A should |
| 39 |
be aligned with the baseline -- the grey line near the bottom of the image, and |
| 40 |
the left side bearing is too large for the image). Use |
| 41 |
:menuselection:`Edit --> Select --> Select All` to select all the points in the |
| 42 |
image, depress the mouse on one of those points, and drag the entire image down |
| 43 |
to the base line, and perhaps over to the left a little too. |
| 44 |
|
| 45 |
The example is also too small. Make sure that all points are still selected and |
| 46 |
then invoke :menuselection:`Element --> Transform --> Transform`. Select Scale |
| 47 |
Uniformly from one of the pulldown lists in the Transform dialog, and enter 140% |
| 48 |
or so. |
| 49 |
|
| 50 |
Obvious this is rather hit or miss. If you design your glyphs in a uniform way |
| 51 |
in the program you chose you will be able to use a uniform scale factor for all |
| 52 |
of them. |
| 53 |
|
| 54 |
In Inkscape the following approach will simplify the process: |
| 55 |
|
| 56 |
#. Open Inkscape |
| 57 |
#. From the File menu, select Document Properties. |
| 58 |
#. Set units to pixels (px) and document dimensions to 1000 x 1000, click OK |
| 59 |
|
| 60 |
:small:`Or if your font has a different number of units per em use that, |
| 61 |
but 1000 is fontforge's default)` |
| 62 |
#. Set a horizontal guide at 200px |
| 63 |
|
| 64 |
Use this as your baseline. |
| 65 |
#. Draw a glyph - the hardest part! :-) |
| 66 |
#. Save the drawing as an SVG file |
| 67 |
#. Open FontForge |
| 68 |
#. From the File menu, select Import, chose SVG, find your drawing, click OK |
| 69 |
#. From the Element menu select Transform, set the Y value to -200, click OK |