Debian Codegraph @

doc/sphinx/ui/menus/cidmenu.rst

raw
1 The CID Menu
2 ============
3
4 The CID Menu provides a few commands for manipulating CID keyed fonts. If the
5 current font is a CID keyed font the menu also includes a list of all subfonts
6 that make up this one. This menu is only available in the font view.
7
8 .. warning::
9
10 FontForge's support for CID-keyed fonts is rudimentary; especially attempting
11 to use Compact encodings and the Metrics View in CID-keyed fonts is known to
12 cause issues and crashes. At one time, the memory usage of CID-keyed fonts
13 was seen as very worrisome (≈250MB), however as even most modern smartphones
14 can support such usage it is no longer a concern for the majority of users.
15 Therefore, we recommend that if you will make serious edits to a CID-keyed
16 font, you :ref:`flatten <cidmenu.CID>` it first to prevent crashes and memory
17 corruption. Bug fixes are always welcome-to start, see
18 `issue №3946 <https://github.com/fontforge/fontforge/issues/3946#issuecomment-534005675>`__.
19
20
21 .. _cidmenu.CID:
22
23 Er... What is a CID keyed Font?
24 -------------------------------
25
26 A CID keyed font is a postscript (or opentype) font designed to hold Chinese,
27 Japanese and Korean characters efficiently. More accurately a CID font is a
28 collection of several sub-fonts each with certain common features (one might
29 hold all the latin letters, another all the kana, a third all the kanji). This
30 allows font-wide hinting to be crafted for subsets of glyphs to which have
31 something in common.
32
33 CID keyed fonts do not have an encoding built into the font, and the glyphs do
34 not have names. Instead the font is associated with a glyph set and on each
35 glyph set there are several character mappings defined. These mappings are
36 similar to encodings but allow for a wider range of behaviors.
37
38 A CID is a glyph index and is used to look up glyph descriptions instead of
39 glyph names in other types of fonts. Using a glyph set FontForge will often be
40 able to map a CID to a unicode character name (but not always), so FontForge
41 will give glyphs names when it can.
42
43 For more information see the
44 :ref:`section on CID keyed fonts on the font view page <fontview.CID>`.
45
46 .. _cidmenu.Convert:
47
48 .. object:: Convert to CID
49
50 If the current font is not a CID font then this command will convert it into
51 one containing one subfont (with the glyphs in this font). You will be
52 prompted for a glyph set.
53
54 .. _cidmenu.ConvertCMap:
55
56 .. object:: Convert By CMap
57
58 If the current font is not a CID font then this command will convert it into
59 one containing a single subfont. You will be prompted for an Adobe CMap file.
60
61 .. _cidmenu.Flatten:
62
63 .. object:: Flatten
64
65 If the current font is a CID font then this command will convert it into a
66 normal (flat) font by taking all the glyphs from all the sub-fonts and
67 merging them into one normal font. The new font should be in the same order
68 as the CID font (ie. ordered by CID). After this operation you may re-encode
69 it into whatever encoding is appropriate.
70
71 .. _cidmenu.FlattenCMap:
72
73 .. object:: Flatten By CMap
74
75 If the current font is a CID font then this command will convert it into a
76 normal font. It prompts you for an Adobe CMap file and uses that to define an
77 encoding for the resultant font.
78
79 .. _cidmenu.Insert:
80
81 .. object:: Insert Font
82
83 Will allow you to browse for a normal font which will be added as another sub
84 font to the current CID font.
85
86 .. _cidmenu.Blank:
87
88 .. object:: Insert Blank
89
90 Inserts a blank sub-font into the current CID font.
91
92 .. _cidmenu.Remove:
93
94 .. object:: Remove Font
95
96 Removes the current font from the CID font. Anything in it will be lost. (If
97 you want to save it first then use Generate Font and save it as a pfb file
98 (or any other simple format).
99
100 .. _cidmenu.ChangeSup:
101
102 .. object:: Change Supplement...
103
104 Displays the Registry/Ordering information of the font and allows you to
105 change the Supplement level.
106
107 .. _cidmenu.FontInfo:
108
109 .. object:: CID Font Info
110
111 This allows you to provide information on the entire collection of subfonts
112 rather than just the current subfont. It provides access to the standard
113 :doc:`font info dialog </ui/dialogs/fontinfo>`.
114
115 .. object:: <sub font name>
116
117 Clicking on a different sub font name in the menu will cause that sub-font to
118 be displayed instead of the current one.