Previous Next
406
CHAPTER 5 Text
5.3.1 Text-Positioning Operators
Text space is the coordinate system in which text is shown. It is defined by the
text matrix, Tm , and the text state parameters Tfs , Th , and Trise , which together
determine the transformation from text space to user space. Specifically, the ori-
gin of the first glyph shown by a text-showing operator is placed at the origin of
text space. If text space has been translated, scaled, or rotated, then the position,
size, or orientation of the glyph in user space is correspondingly altered.
TABLE 5.5 Text-positioning operators
OPERANDS OPERATOR DESCRIPTION
tx t y Td Move to the start of the next line, offset from the start of the current line by
(tx , ty ). tx and ty are numbers expressed in unscaled text space units. More pre-
cisely, this operator performs the following assignments:
1 0 0
T m = T lm = 0 1 0 × T lm
tx ty 1
tx t y TD Move to the start of the next line, offset from the start of the current line by
(tx , ty ). As a side effect, this operator sets the leading parameter in the text state.
This operator has the same effect as the following code:
−ty TL
tx ty Td
a b c d e f Tm Set the text matrix, Tm , and the text line matrix, Tlm :
a b 0
T m = T lm = c d0
e f 1
The operands are all numbers, and the initial value for Tm and Tlm is the identity
matrix, [ 1 0 0 1 0 0 ]. Although the operands specify a matrix, they are passed
to Tm as six separate numbers, not as an array.
The matrix specified by the operands is not concatenated onto the current text
matrix, but replaces it.
— T* Move to the start of the next line. This operator has the same effect as the code
0 Tl Td
where Tl is the current leading parameter in the text state.
Previous Next