Debian Codegraph @

doc/sphinx/ui/dialogs/InsertTextDlg.rst

raw
1 Insert Text Dialog
2 ==================
3
4 .. image:: /images/InsertTxtDlg.png
5 :align: right
6
7 Generally when designing a font you will not want to use this dialog. What is
8 the point of a glyph which is made up of precomposed text?
9
10 But occasionally it is useful. A company's logo might want to live in a single
11 glyph.
12
13 This dialog looks rather like the :doc:`print dialog <display>`. You may enter
14 text, display it in a given font, and at a desired pointsize. You may apply
15 OpenType features.
16
17 Once you have composed your text, you may insert it into a glyph. The text will
18 be insert as the outlines of the characters you entered. In the simplest case,
19 the text will much as you entered them at the origin of the glyph.
20
21 .. image:: /images/TextUnbound.png
22
23 The text will be scaled. If you entered the text with a pointsize of 12, then
24 the outlines will be scaled so that the em-size is 12. If you use a font where
25 the em-size is 1000, and the character "H" is 662, then after scaling the "H"
26 will be 12*662/1000 = 7.9 units high.
27
28 (You can, of course, rescale the outlines once they are in the glyph).
29
30 If you enter a lot of text, it will wrap. The dialog shows the length of the
31 longest line, and the location at which text will wrap.
32
33 Complications arise if you select a path in the glyph before invoking the Insert
34 Text dialog -- then you can bind the text you enter so that it curves with the
35 path. You can have FontForge scale your text so that it exactly fits the path
36 length, or you can position your text at the start, middle or end of the path.
37 Text is bound so that if the path is a horizontal line running from left to
38 right the text will use the path as a baseline and be oriented as you would
39 expect for left to right text, if the path is a horizontal line running right to
40 left, then the text will appear up-side-down. If you don't want the text to use
41 the path as its baseline (if you'd like a gap between the two) then enter a
42 value in "Offset text from path"
43
44 Finally FontForge has two modes for binding text. Either it will use the place
45 where the center of the glyph aligns on the path and rotate the entire glyph
46 appropriately for that point, or it will distort each bit of the glyph as is
47 appropriate for where that bit aligns on the path. In the first approach the
48 letters are cleaner individually but the text as a whole is more jagged.
49
50 .. flex-grid::
51 * - .. figure:: /images/PathToBind.png
52
53 path
54 - .. figure:: /images/TextBoundUnitaryGlyph.png
55
56 Glyphs bound as a unit
57 - .. figure:: /images/TextBoundDistortedGlyphs.png
58
59 Glyphs distorted by binding