Debian Codegraph @

doc/sphinx/ui/dialogs/baseline.rst

raw
1 The baseline dialog, and the OpenType BASE table
2 ================================================
3
4 .. figure:: /images/BASEdlg.png
5
6 This dialog may be invoked by
7 :menuselection:`Element --> Other Info --> Horizontal Baselines` (or
8 ``Vertical Baselines``). It allows you to control the baseline (in either
9 horizontal or vertical orientation) on which the glyphs of a particular script
10 line up. You may also control the spacing between baselines, and the interline
11 (or intercolumn) spacing on a per-script, or even per-language basis.
12
13 See the :ref:`Baseline section <overview.Baseline>` in the overview for a
14 description of why this is important.
15
16 There are currently seven standard baselines. The distinctions between them are
17 described in the OpenType standard. (See the
18 `baseline tags section <http://partners.adobe.com/public/developer/opentype/index_tag4.html>`__)
19
20 Basically most alphabetic scripts will use the 'romn' baseline, most CJK scripts
21 will use the 'ideo'graphic baseline. Tibetan and other Indic scripts will use
22 the 'hang'ing baseline, and math fonts might use the 'math' baseline.
23
24 Roughly the ideographic baseline will line up with the descenders of a Latin
25 (Greek, Cyrillic) script, and the hanging baseline will line up with the
26 ascenders.
27
28 You need to select which baselines your font will support. You may want to
29 specify baselines that apply to scripts which aren't in your font -- this will
30 mean your font is positioned reasonable when used with glyphs from other fonts.
31 In the example above, the font has no Indic characters, but it still specifies a
32 hanging baseline.
33
34 You select which baselines you will support by turning on the appropriate
35 checkboxes. All scripts will have the same set of baselines. In every script one
36 baseline will be the default baseline. Generally glyphs in that script will be
37 drawn with their vertical origin (If you are working on horizontal baselines,
38 that is) on that baseline. You then should specify how other baselines are
39 offset from this one.
40
41 .. image:: /images/BASElang.png
42 :align: left
43
44 You may also set the minimum and maximum extent of the font for each script (by
45 pressing the ``[Set Extents]`` button). This corresponds roughly to a per-script
46 line spacing (or column spacing).
47
48 You may specify a default spacing for the script in general, and then more
49 specific spacings for a given language.
50
51 In the example at left the default spacing for the Latin script allows room for
52 one accent above capital letters. Now English doesn't have any accents
53 (usually), so it might make sense that English could use a tighter line spacing
54 (and, traditionally this has been done). On the other hand Vietnamese stacks
55 multiple accents above one another, so it needs more room than the default.
56
57 But suppose you are typesetting French. Now French sometimes is printed with
58 capital accented letters, but sometimes a "À" will be drawn just as "A" with no
59 accent. So you might create at feature that maps capital accented letters to
60 their unaccented forms:
61
62 ::
63
64 feature NoAc {
65 sub Agrave by A;
66 sub Aacute by A;
67 ...
68 sub Egrave by E;
69 ...
70 } NoAc;
71
72 Then it would be convenient to be change the baseline spacing if these feature
73 were active. And, indeed you can. Simply select the line for French (in this
74 case the default language works for French) and press the [Set Feature Extents]
75 button.
76
77 .. image:: /images/BASEfeat.png
78
79 It is possible to set Extent information even if you do not provide baseline
80 data (that is, if all the baselines are unselected).