XFA Specification
Chapter 25, Rich Text Reference
Supported Character Formatting
941
Supported Character Formatting
The following sections describe the various formatting elements that may be applied to paragraph
content. In addition it describes attributes that may be applied to modify the effect of the elements. Each
character formatting element encloses a section of text and supplies formatting attributes to that text.
Character formatting elements are low-level objects. They must not enclose higher-level elements that
are recognized by XFA. Hence they must not enclose
html
,
body
, or
p
elements.
Character formatting attributes may be applied to
p
elements, in which case they affect all of the text in
the paragraph. Character formatting attributes may also be applied to
span
elements, in which case they
apply to the text enclosed by the
span
element. Enclosed markup must not conflict with enclosing
markup. For example, it is not permissible to set a baseline on a paragraph and a different baseline on a
span within the paragraph. Instead the markup must be flattened so that each section is enclosed in its
own
span
element and marked up separately.
Baseline Adjustment
A region of text may have its baseline position raised or lowered within a line of text via the use of the
[CSS2]
vertical-align
style attribute. The font size of the text is not affected.
This specification supports a restricted set of
[CSS2]
vertical-align formats, hence, this attribute is defined
as:
vertical-align:vAlginValue
where
vAlignValue
is either the keyword baseline or a measurement.
If
vAlignValue
is baseline, the region of text will have its baseline situated on the calculated baseline for
the surrounding line of text. Note that this behavior differs from
[CSS2]
where the region of text has its
baseline situated on the calculated baseline for the surround parent
span
element rather than the
surrounding line.
If
vAlignValue
is a measurement, the region of text will have its baseline raised for a positive
measurement or lowered for a negative measurement in relation to the calculated baseline for the
surrounding line of text. A measurement of zero (0) produces the same result as
vertical-align:baseline
.
Example:
<p>This sentence contains
<span style="vertical-align:-3pt">lowered text</span>
on a line. <br />
<br /> Most <span style="vertical-align:-4pt">
of this sentence is lowered but this
</span>word<span style="vertical-align:+4pt">
appears on the </span> line's baseline. <br />
<br /> This sentence contains
<span style="vertical-align:3pt">
raised text</span> on a line.
</p>
Home Index Bookmark Pages
Pages: Home Index All Pages