Debian Codegraph @

doc/sphinx/techref/cidmapformat.rst

raw
1 Cidmap files
2 ============
3
4 These are FontForge's own files which it uses to map from CIDs in one
5 Registry-Ordering-Supplement to unicode code points.
6
7 Cidmap files generally live in ``$(PREFIX)/share/fontforge`` (often
8 ``/usr/local/share/fontforge`` or ``/usr/share/fontforge``), though they will
9 also be found if they are in the directory containing fontforge itself or the
10 current directory. They are named ``<registry>-<Ordering>-<Supplement>.cidmap``.
11 So ``"Adobe-Japan1-6.cidmap"``, or ``"Adobe-CNS1-4.cidmap"``.
12
13 The first line of the file consists of two numbers, usually the same, which are
14 the total number of CIDs defined by this ROS.
15
16 Subsequent lines have one of three formats
17
18 * <cid> <unicode>
19 * <cid1>..<cid2> <unicode>
20 * <cid> <postscript-name>
21
22 A <cid> is just a decimal number, <unicode> is a hex number, and
23 <postscript-name> is a PostScript name token preceded by a slash.
24
25 The first few lines of Adobe-Japan1-6.cidmap look like:
26
27 ::
28
29 23057 23057
30 0 /.notdef
31 1..60 0020
32 61 00a5
33 62..92 005d
34 93 00a6
35
36 So there are 23057 cids in this ROS. CID 0 is mapped to the postscript name
37 "/.notdef", cids 1-60 are mapped to space (U+0020), exclam (U+0021), ...,
38 lbracket (U+005b), CID 61 is mapped to yen (U+00a5), and so forth.