next up previous contents index
Next: Stroking of Character Outlines Up: Transformation of Fonts Previous: Transformation at Rastering Time   Contents   Index

t1lib and PostScript: Notes on Transformation Matrices

In order to avoid confusion about transformation matrices, we should briefly discuss the differences between t1lib- and PostScript transformation matrices. In t1lib-nomenclature a coordinate description is assumed to be represented by a column vector $(x,y)^T$. In contrast, PostScript assumes a coordinate to be represented by a row vector $(x,y)$. This leads to an exchanged meaning of the second and third matrix element between t1lib and PostScript. From the mathematical point of view this is caused by matrix transposition. To make this clear, let me quote the matrix

\begin{displaymath}
\mathbf{A}_{\mbox{\footnotesize PostScript}}=
\left(
\begin...
...cc}
a & b & 0\\
c & d & 0\\
t_x & t_y & 1
\end{array}\right)
\end{displaymath}

from the PostScript Language Reference Manual (Adobe, Red Book). If we forget about translation which in this sense is not implemented by t1lib, we only have to consider the top left submatrix consisting of $a$, $b$, $c$ and $d$. The t1lib-equivalent to this matrix would be written as

\begin{displaymath}
\mathbf{A}_{\mbox{\tt\footnotesize t1lib}}=
\left(
\begin{array}{cc}
a & c \\
b & d \\
\end{array}\right)
\end{displaymath}

I.e., the meaning of $b$ and $c$ is exchanged. Notice that font matrices as found in Type 1 font files have to be interpreted according to the PostScript notation. But a user should never come close to something other than the t1lib transformation matrices


next up previous contents index
Next: Stroking of Character Outlines Up: Transformation of Fonts Previous: Transformation at Rastering Time   Contents   Index
2004-10-04