Debian Codegraph @

doc/sphinx/ui/dialogs/groups.rst

raw
1 Groups of Glyphs
2 ================
3
4 A group is a collection of glyphs. It may be any collection that appeals to you.
5 My expectation is that groups will be used to collect glyphs which are visually
6 associated (in some way) close together so that they may be examined and changed
7 without the visual clutter of the rest of the font. So you might make a group
8 that consisted of "b d p q" which often have similar shapes, or in a Korean font
9 you might wish to look at all sylables with a give cho-sung.
10
11 .. image:: /images/fontview-grouped.png
12 :align: left
13
14 FontForge treats groups like baby encodings. In the image at left, it is
15 displaying a font showing only the glyphs "b d p q". The order the glyphs are
16 mentioned in the group is the order in which they will be displayed in the
17 fontview -- and, like an encoding the group may be compaced so there are no
18 empty holes for missing glyphs (so if the group had contained "b d p uniAC00 q"
19 and the font was missing uniAC00, the display would be exactly the same) or
20 uncompacted with holes.
21
22 Glyphs in a group may be specified by glyph name, by unicode code point or by a
23 range of unicode values. The examples above all used glyph names. A unicode code
24 point looks like "U+XXXX" (where XXXX indicates a hex number). Occasionally
25 fonts will use this notation to name their glyphs (they should not, but some
26 do), that should not be a significant problem because such glyphs should have
27 the obvious unicode code points and so will still match. A range of unicode code
28 points looks like "U+XXXX-U+YYYY" (XXXX < YYYY).
29
30 A groups are hierarchical. A group may either contain a list of glyphs, or a
31 list of sub-groups. (If you display (in the fontview) a group which contains
32 subgroups you will see all glyphs in all sub-groups. A glyph may occur more than
33 once if that is desirable. So a group could contain "A A A A" and the fontview
34 would show four copies of "A" (I'm not sure why you'd want to do that, but you
35 could). As you design your groups you can ask fontforge to check so that you do
36 not inadvertently put the same glyph in more that one group (or in the same
37 group twice).
38
39
40 Display by Groups
41 -----------------
42
43 .. image:: /images/displaygroups.png
44 :align: right
45
46 The Display by Groups dialog is shown in the screen shot at right. The top-level
47 group is called "Groups" it has two children, one called "Vowels" which is a
48 terminal group and contains the glyph names of the latin vowels, the other
49 called "consonants" which itself contains three subgroups.
50
51 Any group with children will have (to the right of its name) a square box
52 containing either a "+" or a "-", clicking on this box will either expand all
53 the sub-groups of the group, or contract them into invisibility (here all are
54 expanded).
55
56 Clicking on a group's name will select it (clicking again will deselect it).
57 Here groups "ascenders" and "descenders" are selected. If you were to press
58 ``[OK]`` then the fontview would show the glyphs associated with "b d f h k l t
59 g j p q y" in that order.
60
61 Underneath everything is a check box you may use to specify whether you want the
62 results compacted or not.
63
64
65 Define Groups
66 -------------
67
68 .. image:: /images/definegroups.png
69 :align: right
70
71 This dialog is a bit more complicated than the previous one. It again contains
72 the group list at the top of the dialog, but here only one group at a time may
73 be selected, and information about it is displayed in the bottom part of the
74 dialog and is subject to change.
75
76 You can ``[Delete]`` the group (this also deletes any subgroups). If the group
77 contains no glyphs then you may add sub-groups to it. Every group has a name. If
78 the group contains no subgroups you may add glyphs to it.
79
80 The ``[Set]`` and ``[Select]`` buttons interact with the selection in the
81 associated fontview. ``[Set]`` sets the glyph list to the glyphs selected in the
82 fontview, while ``[Select]`` changes the selection to the glyphs specified in
83 the glyph list. Normally glyphs are entered into the glyph list by ``<*>Name``,
84 but you can change the radio button to ``<*>Unicode`` and glyphs will be entered
85 as U+0067 U+006A U+0070-U+0071 U+0079.
86
87 If you select ``[*]No glyph duplicates`` then ff will prevent you from entering
88 the same glyph name (or unicode code point) twice (ff will allow you to enter
89 "A" and U+0041 -- because I'm lazy and this is harder to check for and less
90 likely to occur). If you set this in a parent group then there can be no glyph
91 duplicates among any of its children.