CHAPTER 5
392
Text
Other graphical effects can be achieved by treating the glyph outline as a path in-
stead of filling it. The
text rendering mode
parameter in the graphics state speci-
fies whether glyph outlines are to be filled, stroked, used as a clipping boundary,
or some combination of these effects. (This parameter does not apply to Type 3
fonts.)
Example 5.4 treats glyph outlines as a path to be stroked. The
Tr
operator sets the
text rendering mode to 1 (stroke). The
w
operator sets the line width to 2 units in
user space. Given those graphics state parameters, the
Tj
operator strokes the
glyph outlines with a line 2 points thick (see Figure 5.2).
Example 5.4
BT
/F13 48 Tf
20 38 Td
1 Tr
2 w
( ABC ) Tj
ET
ABC
FIGURE 5.2
Glyph outlines treated as a stroked path
Example 5.5 treats the glyphs’ outlines as a clipping boundary. The
Tr
operator
sets the text rendering mode to 7 (clip), causing the subsequent
Tj
operator to
impose the glyph outlines as the current clipping path. All subsequent painting
operations mark the page only within this path, as illustrated in Figure 5.3. This
state persists until some earlier clipping path is reinstated by the
Q
operator.
Index Bookmark Pages Text
Previous Next
Pages: Index All Pages
This HTML file was created by VeryPDF PDF to HTML Converter product.