See: Description
Interface | Description |
---|---|
Attribute |
Attribute
|
AttributedRun |
A run of element occurrences with attributes, with support for
transformations, used by inline text formatters.
|
Class | Description |
---|---|
BasicFormatter |
General purpose inline formatter.
|
DigitCase |
Enumerated values for
ElementAttribute.digitCase . |
DigitWidth |
Enumerated values for
ElementAttribute.digitWidth . |
ElementAttribute |
This class defines attributes which can be placed on elements
on
AttributedRuns . |
FallbackFontSet |
A set of fonts indexed by
ULocale , typically used for fallback. |
FontStyle |
Enumerated values for
ElementAttribute.fontStyle . |
InterElementAttribute |
This class defines attributes which can be placed between elements on
AttributedRun s. |
LigatureLevel |
Enumerated values for
InterElementAttribute.ligatureLevel . |
PDF16PlainTextFormatter |
Inline formatter for PDF 1.6 plain text form fields.
|
PDF16RichTextFormatter |
Inline formatter for PDF 1.6 rich text form fields.
|
TypographicCase |
Enumerated values for
ElementAttribute.typographicCase . |
Exception | Description |
---|---|
FormattingException |
FormattingException.
|
NoSuitableFontException |
NoSuitableFontException.
|
This package contains classes that implement inline text formatting.
The job of a full-fledged layout engine can be roughly described as the interpretation of some input, typically mixing characters and images on which styling constraints are applied, to produce an output which is a set of positioned glyphs and images. To accomplish this job, a layout engine will maintain data structures, and invoke a number of subcomponents to modify and refine those datastructures (e.g. a table formatter, an hyphenation engine).
A subcomponent of particular interest is an inline text formatter: this subcomponent is concerned with text only, and is tasked with the selection of fonts, glyphs in those fonts, and positions for those glyphs. �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 layout engine to slice the output of the inline text formatter into lines, align columns, etc.
The inline formatters implemented in this package do not have
an explicit knowledge of the data structure of the layout
engine they support. Instead, they have a view on those data
structure through the AttributedRun
interface. This interface captures the idea of
a run of characters or glyphs, with attributes which describe
the styling constraints. The attributes are key/value pairs.
The typical client of this package will build some object that
implements the AttributedRun interface. This run contains
characters. In addition, the client sets some well-known
attributes on the run. For example, if the target formatter is
a CSS formatter, the client sets attributes such as
ElementAttributes.CSSFamily to communicate the styling
constraints to the formatter. The formatter can also be
configured with resources external to the document, such as
the set of fonts which can be used. The client then invokes
the format
method of the formatter, passing it
the object implementing AttributedRun
. As the
formatter does its work, it transforms the
AttributedRun
, making successive decisions on how
to achieve the styling constraints. At the end, the
AttributedRun contains selected fonts, selected glyphs, and
selected positions for those glyphs.
Each formatter defines the set of styling attributes it
interprets. Those attributes are key/value pairs, where the
key is an object of type ElementAttribute
or InterElementAttribute
. The identity of those objects defines
the styling attributes; in other words, the object CSS20Attribute
(and only this object) is the key that CSS
formatters will use to retrieve the CSS properties specified
by the client. Similarly, each formatter defines the
attributes under which the result of formatting can be
accessed by the client.
AFE offers three formatters:
BasicFormatter
: the
client selects the font(s) with which the run must be formatted.
PDF16PlainTextFormatter
:
targeted at the formatting of plain text form fields in PDF 1.6.
PDF16RichTextFormatter
:
targeted at the formatting of rich text form fields in PDF 1.6.
While each formatter suports a different set of styling attributes, they all support the same set of writing systems and font layout technologies.
The following writing systems are supported:
The following font layout technologies are supported:
The precise definitions of the writing systems, font technologies and combinations of them which are supported are described here.
Copyright © 2010 - 2020 Adobe. All Rights Reserved