summaryrefslogtreecommitdiff
path: root/Build/source/texk/ttf2pt1/maps/unicode-sample.map
blob: 0e57967c1f39e30e25dff4312cfb48074ba57b12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# this file is a sample Unicode map description.
# It describes which glyphs are to be included in the font
# and at which character position they are to be put.

# If the character position is greater than 255, the glyph is included, but
# does not appear in the encoding table (you must then use font reencoding
# to use this glyph).
# That makes it possible to have more than 256 glyphs in a font.
# Currently the maximum supported number of glyphs is 1024.

# Use this file as the argument to ttf2pt1's -L option.

# 1999-11-24 Thomas.Henlich@mailbox.tu-dresden.de
# 2000-03-01 Sergey Babkin: added 3rd format

# comment lines start with '#' or '%' or '//'

# The default source encoding table in the TTF file is Unicode (pid=3,eid=1).
# However a map may specify another source encoding with the "id <pid> <eid>"
# directive. If this directive is used at the beginning of the map file,
# it applies to the whole file. If it is used after a "plane" directive,
# then it sets the source encoding for this particular destination plane
# (possibly overriding the file-wide id directive). The user can also
# specify the source encoding explicitly at the comman line in the
# argument to the option -L. This used-specified source encoding overrides
# any id directives in the map file.

# examples:

# same as Unicode (default)
id 3 1

# One file may contain multiple actual translation tables. Each particular
# table within a file is named a plane. The primary use of planes is
# for multi-plane Eastern fonts with over 256 glyphs: for them one TTF
# file gets converted into multiple Type1 files, with each resulting file
# containing one plane of the original font. But they may also be used
# in other creative ways. Each plane may be specified in different format
# although this is not recommended for aesthetical reasons. If a map file
# contains any specifications of planes then the plane argument MUST
# be specified to the converter with that map file. If a map file
# contains no specifications of planes then the plane argument MUST NOT
# be specified to the converter with that map file.
#
# The plane maps start from the plane directive and continue to the next
# plane directive or end of file. The plane directive must be located
# at the very beginning of a separate string and contain the word "plane"
# followed by whitespace and the plane name. The whitespace characters
# are not allowed in the plane names. Non-alphanumeric characters are
# discouraged in the plane names as well.

# examples:

plane 81
=27	U+0027	APOSTROPHE

plane otherplane
 0, 1, 2


% There is one code assignment per line.
// Three formats are recognized:
# 1. optional whitespace, followed by '=', followed by a hex number
# (character position), followed by optional whitespace, followed by
# 'U+', followed by a four-digit hex number (the Unicode of the glyph we want
# here), followed by any number of characters.

// example:

=20	U+0020	SPACE
=48	U+0021	EXCLAMATION MARK
=22	U+0022	QUOTATION MARK
=23	U+0023	NUMBER SIGN
=24	U+0024	DOLLAR SIGN
=25	U+0025	PERCENT SIGN
=26	U+0026	AMPERSAND
=27	U+0027	APOSTROPHE

=E0	U+042E	CYRILLIC CAPITAL LETTER YU
=E1	U+0410	CYRILLIC CAPITAL LETTER A
=E2	U+0411	CYRILLIC CAPITAL LETTER BE
=E3	U+0426	CYRILLIC CAPITAL LETTER TSE
=E4	U+0414	CYRILLIC CAPITAL LETTER DE
=E5	U+0415	CYRILLIC CAPITAL LETTER IE
=E6	U+0424	CYRILLIC CAPITAL LETTER EF
=E7	U+0413	CYRILLIC CAPITAL LETTER GHE

% 2. optional whitespace, followed by '<', followed by one or more
% non-whitespace characters,
% followed by optional whitespace, followed by '/x',  followed by
% a hex number (character position), followed by optional
% whitespace, followed by '<U', followed by a four-digit hex number
% (the Unicode of the glyph we want here), followed by '>' and any number
% of characters.

# example:

<I>                    /x40     <U0049> LATIN CAPITAL LETTER I
<t>                    /x41     <U0074> LATIN SMALL LETTER T
<r>                    /x43     <U0072> LATIN SMALL LETTER R
<o>                    /x44     <U006F> LATIN SMALL LETTER O
<c>                    /x45     <U0063> LATIN SMALL LETTER C
<k>                    /x46     <U006B> LATIN SMALL LETTER K
<s>                    /x47     <U0073> LATIN SMALL LETTER S

<Eu>                   /xA4     <U20AC> EURO SIGN

# 3. optional whitespace, followed by '!', followed by a hex number
# (character position), followed by optional whitespace, followed by
# 'U+', followed by a four-digit hex number (the Unicode of the glyph we want
# here), followed by the name of the glyph that will be used in the
# output file.

# example:

!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent

# 4. compact format: just list of unicodes separated by commas or ranges
# denoted by a dash between unicodes. These unicodes are mapped to
# the output codes starting from 0 and continuously increasing.
# It is possible to reset the current code by using the "at" directive
# which must start at beginning of the line and give the new current
# output code (which will be assigned to the next occuring unicode)
# as decimal, hexadecimal or octal in C notation. The "at directive must
# take a separate line. The spaces around unicodes don't matter.

# example: 
# map unicodes 0x40, 0x400, 0x4000 to the output codes 0, 1, 2 and unicodes
# 0xf010 - 0xf020, 0xf030 to the output codes 0x11-0x22

 0, 1, 2
at 0x11
 0xf010- 0xf020, 0xf030


# the first format is used by Roman Czyborra on his fine WWW pages:
# http://czyborra.com/charsets/iso8859.html

# the second format is used in the Linux locale charmaps files:
# /usr/share/i18n/charmaps/*

# we don't need those glyphs in the encoding table
=100     U+0030  DIGIT ZERO
=101     U+0031  DIGIT ONE
=102     U+0032  DIGIT TWO
=103     U+0033  DIGIT THREE
=104     U+0034  DIGIT FOUR
=105     U+0035  DIGIT FIVE
=106     U+0036  DIGIT SIX
=107     U+0037  DIGIT SEVEN
=108     U+0039  DIGIT NINE
=109     U+0038  DIGIT EIGHT