SECTION 5.1
389
Organization and Use of Fonts
5.1.1 Basics of Showing Text
Example 5.1 illustrates the most straightforward use of a font. The text
ABC
is
placed 10 inches from the bottom of the page and 4 inches from the left edge, us-
ing 12-point Helvetica.
Example 5.1
BT
/F13 12 Tf
288 720 Td
( ABC ) Tj
ET
The five lines of this example perform the following steps:
1. Begin a text object.
2. Set the font and font size to use, installing them as parameters in the text state.
(The font resource identified by the name
F13
specifies the font externally
known as
Helvetica
.)
3. Specify a starting position on the page, setting parameters in the text object.
4. Paint the glyphs for a string of characters at that position.
5. End the text object.
The following paragraphs explain these operations in more detail.
To paint glyphs, a content stream must first identify the font to be used. The
Tf
operator specifies the name of a font resource—that is, an entry in the
Font
subdictionary of the current resource dictionary. The value of that entry is a font
dictionary. The font dictionary identifies the font’s externally known name, such
as
Helvetica
, and supplies some additional information that the application needs
to paint glyphs from that font. The font dictionary optionally provides the defini-
tion of the font program itself.
Note:
The font resource name presented to the
Tf
operator is arbitrary, as are the
names for all kinds of resources. It bears no relationship to an actual font name,
such as
Helvetica
.
Example 5.2 illustrates an excerpt from the current page’s resource dictionary,
which defines the font dictionary that is referenced as
F13
in Example 5.1.
Index Bookmark Pages Text
Previous Next
Pages: Index All Pages
This HTML file was created by VeryPDF PDF to HTML Converter product.