com.adobe.fontengine.overview.html Maven / Gradle / Ivy
Show all versions of aem-sdk-api Show documentation
The Adobe Font Engine (AFE) is a set of classes that provides basic access to
fonts.
Functionality
The functionality is organized around three concepts: fonts, font
management, and inline text formatting
.
A font
is best understood as a set of glyphs, each identified by a glyph identifier
(gid). Depending on the font, we know more or less about those glyphs: for
example, we may have their outlines, widths and other metrics. AFE does not
support the rasterization of glyphs, but fonts can be streamed to PDF
documents. Font data and font manipulation is handled by the package {@link
com.adobe.fontengine.font}.
The primary function of Font management
is to inspect a file system or other input mechanism to create a list of Fonts
that represent the actual fonts. Font management is handled by the package
{@link com.adobe.fontengine.fontmanagement}.
Font sets store collections of Fonts and can be used for font search. Different
types of font sets exist so that different search methods can be used. For
example, an instance of {@link
com.adobe.fontengine.inlineformatting.css20.CSS20FontSet CSS20FontSet}
can be used in conjunction with a {@link
com.adobe.fontengine.inlineformatting.PDF16RichTextFormatter
PDF16Formatter} to resolve CSS font descriptions as described in the PDF 1.6
specification.
Inline text formatting is the process of taking text decorated with
styling attributes, and selecting fonts, glyphs in those fonts, and positions
for those glyphs, in order to lay out that text. ?inline? refers to the fact
that this subcomponent has a limited view of layout: the text is set on a
single infinite line, without direct consideration of column alignment and
such. It is the job of the client of inline text formatting to slice the output
of the inline text formatter into lines, align columns, etc. Inline text
formatting is handled by the package {@link
com.adobe.fontengine.inlineformatting}. Different inline text formatters can
exist for laying out different input. For example, an instance of {@link
com.adobe.fontengine.inlineformatting.PDF16RichTextFormatter
PDF16Formatter} can be used to lay out Rich Text, as described in the PDF
1.6 specification.
Operational characteristics
AFE targets server environments and is designed with enterprise applications in
mind. In particular, this implies a relatively static set of fonts and a
reasonably large amount of available memory.
AFE is designed to be used in multithreaded programs. All synchronization
issues that involve client usage are specified in this API documentation.
There are a couple of suggested usage/threading models that will allow a client
to load a collection of fonts, build and configure a font set, and use it to
format text in one or more threads. To read more on this see the
AFE Threading Model documentation.
A discussion of error handling and suggested recovery mechanisms are discussed in the
AFE Exception Handling documentation.
afe.jar depends on AGL 3.2, which is available from the Perforce depot
redcloud:1820 (guest account, no password) in
//globaldev/releases/agl/private/agl32/aglj/aglj32.jar.
AFE versus CoolType and XTG
AFE?s functionality partially overlaps that of CoolType. However, their designs
are not completely aligned. To see how they align, see
AFE vs. CoolType
.
Similarly, AFE functionality partially overlaps that of WRServices, again with
some differences. Some of them are documented in
AFE vs. WRServices.