Class Base14
PDF documents can refer to fourteen Type 1 fonts with well-known names, without having to embed those fonts, yet achieve predictable results. PDF consumers are supposed to have access to actual fonts that can be used whenever a PDF document refers to one of those fonts. Collectively, those fonts are known as the Base 14 fonts.
PDF consumers are given a little bit of freedom in choosing the actual fonts, but not much: the glyph complement, Type 1 encoding and the advance widths of the glyphs are imposed by the PDF specification.
AFE supports the generation of PDF documents that refers to those 14 fonts
in the following way: AFE exposes 14 Font objects, and guarantees
that if layout is performed with one of those objects, then a PDF content
stream generated using the usual method (but calling for the corresponding
Base 14 font, rather than embedding it) will lead to the appropriate result.
This guarantee is limited to the 14 Font objects exposed in this
class. In particular, using the usual mechanism to load a font which happens
to be named "Symbol" does not, by itself, guarantee compabitility with the
Base 14 font "Symbol".
The Font objects exposed by this package are suitable for CSS
selection. That is, they can be added to CSS20FontSets, and selected
by the usual CSS attributes. For each font, we indicate its CSS family name
(the other characteristics are obvious).
The Font objects exposed by this package behave as if they had a
Unicode 'cmap', which is necessary for layout of text. The details of these
cmaps can be found here .
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FontThe Courier-Bold font, with CSS family name Courier.static final FontThe Courier-BoldOblique font, with CSS family name Courier.static final FontThe Courier-Oblique font, with CSS family name Courier.static final FontThe Courier font, with CSS family name Courier.static final FontThe Helvetica-Bold font, with CSS family name Helvetica.static final FontThe Helvetica-BoldOblique font, with CSS family name Helvetica.static final FontThe Helvetica-Oblique font, with CSS family name Helvetica.static final FontThe Helvetica font, with CSS family name Helvetica.static final FontThe Symbol font, with CSS family name Symbol.static final FontThe Times-Bold font, with CSS family name Times.static final FontThe Times-BoldItalic font, with CSS family name Times.static final FontThe Times-Italic font, with CSS family name Times.static final FontThe Times-Roman font, with CSS family name Times.static final FontThe ZapfDingbats font, with CSS family name ZapfDingbats. -
Method Summary
Modifier and TypeMethodDescriptionstatic FontfromPSName(String name) Return the Base 14 font for name, or null if name is not the name of a Base 14 font.
-
Field Details
-
courierRegular
The Courier font, with CSS family name Courier. -
courierBold
The Courier-Bold font, with CSS family name Courier. -
courierOblique
The Courier-Oblique font, with CSS family name Courier. -
courierBoldOblique
The Courier-BoldOblique font, with CSS family name Courier. -
helveticaRegular
The Helvetica font, with CSS family name Helvetica. -
helveticaBold
The Helvetica-Bold font, with CSS family name Helvetica. -
helveticaOblique
The Helvetica-Oblique font, with CSS family name Helvetica. -
helveticaBoldOblique
The Helvetica-BoldOblique font, with CSS family name Helvetica. -
timesRegular
The Times-Roman font, with CSS family name Times. -
timesBold
The Times-Bold font, with CSS family name Times. -
timesItalic
The Times-Italic font, with CSS family name Times. -
timesBoldItalic
The Times-BoldItalic font, with CSS family name Times. -
symbol
The Symbol font, with CSS family name Symbol. -
zapfDingbats
The ZapfDingbats font, with CSS family name ZapfDingbats.
-
-
Method Details
-
fromPSName
Return the Base 14 font for name, or null if name is not the name of a Base 14 font.
-