CHAPTER 5
440
Text
The following is an example of a
W
entry:
/W [ 120 [ 400 325 500 ]
7080 8032 1000
]
In this example, the glyphs having CIDs 120, 121, and 122 are 400, 325, and 500
units wide, respectively. CIDs in the range 7080 through 8032 all have a width of
1000 units.
Glyphs from a CIDFont can be shown in vertical writing mode. (This is selected
by the
WMode
entry in the associated CMap dictionary; see Section 5.6.4,
placement for each glyph and the position vector that relates the horizontal and
vertical writing origins.
The default position vector and vertical displacement vector are specified by the
DW2
entry in the CIDFont dictionary.
DW2
is an array of two values: the vertical
component of the position vector
v
and the vertical component of the displace-
ment vector
w1
(see Figure 5.5 on page 396). The horizontal component of the
position vector is always half the glyph width, and that of the displacement vector
is always 0. For example, if the
DW2
entry is
/ DW2 [ 880
−1000
]
then a glyph’s position vector and vertical displacement vector are
v
= (
w0
÷
2
,
880
)
w1
= (
0
, –
1000
)
where
w0
is the width (horizontal displacement) for the same glyph. Note that a
negative value for the vertical component places the origin of the next glyph
be-
low
the current glyph because vertical coordinates in a standard coordinate sys-
tem increase from bottom to top.
The
W2
array allows the definition of vertical metrics for individual CIDs. The
elements of the array are organized in groups of two or five, where each group is
in one of the following two formats:
c
[
w1
1y
v
1x
v
1y
w1
2y
v
2x
v
2y
… ]
c
first
c
last
w1
1y
v
1x
v
1y