Character styles
The CharacterStyle element and its attributes — identity, BasedOn, font and size, fill, tracking — the RootCharacterStyleGroup, and how a range that applies a character style can still override one of its attributes locally.
A character style formats a run — a span of text inside a paragraph — usually setting only the few attributes that differ from the surrounding text.
In short: A <CharacterStyle> overrides formatting on a run rather than a
whole paragraph, so it typically carries just the handful of attributes that
change — a bold face, a fill colour, some tracking — and inherits the rest from its
BasedOn parent and, ultimately, from the
paragraph style the run sits in. Every character
style lives in <RootCharacterStyleGroup> inside Resources/Styles.xml and
bottoms out at the uneditable [No character style] root. A run names its
character style through AppliedCharacterStyle, but can also set an attribute
directly on its range, where the local value wins over the style. This page lists
the attributes our parser reads; the order they resolve in is covered under
conflict resolution.
A character style formats a run — a span of text inside a paragraph — and unlike
a paragraph style it usually sets only the few attributes that differ from the
surrounding text. The rest is inherited: from the style's BasedOn parent, and
ultimately from the paragraph style the run sits
in. This page lists the attributes our parser reads off <CharacterStyle>; the
order they resolve in is covered under conflict resolution.
Where they live
Each <CharacterStyle> sits inside <RootCharacterStyleGroup> (with optional
intermediate <CharacterStyleGroup> nesting the parser flattens). The uneditable
root is CharacterStyle/$ID/[No character style] — the bottom of every character
cascade and the style a run applies when it wants
nothing but the paragraph defaults.
<RootCharacterStyleGroup>
<CharacterStyle Self="CharacterStyle/$ID/[No character style]"
Name="$ID/[No character style]"/>
<CharacterStyle Self="CharacterStyle/Emphasis" Name="Emphasis"
FontStyle="Bold" PointSize="12"/>
</RootCharacterStyleGroup>Attributes
AppliedFont may appear as an attribute or as an <AppliedFont> child inside
<Properties>; Leading is read from the run/range rather than the style.
StrokeColor set to the literal Swatch/None is normalised to unset, so a
BasedOn chain can fall through to a real colour from a parent.
| Attribute · CharacterStyle | Type / values | Support | Notes |
|---|---|---|---|
| Self | string id | Supported | The style id, e.g. "CharacterStyle/Emphasis". What a run references via AppliedCharacterStyle. |
| Name | string | Parsed, not yet rendered | Human-readable name; resolution keys on Self. |
| BasedOn | string id | Supported | Parent character style id, or the [No character style] root. Attribute or <BasedOn> Properties child. |
| AppliedFont | string (font family) | Supported | Font family. Attribute or <AppliedFont> Properties child. |
| FontStyle | string (e.g. "Bold", "Italic") | Supported | Named face within the family. |
| PointSize | double (pt) | Supported | Type size in points. |
| FillColor | string (Color/Swatch id) | Supported | Glyph fill; a reference into Resources/Graphic.xml. |
| FillTint | double (0–100%) | Supported | Fill tint percentage; absent means full strength. |
| StrokeColor | string (Color/Swatch id) | Supported | Glyph outline paint. "Swatch/None" normalises to unset. |
| StrokeWeight | double (pt) | Supported | Outline weight when StrokeColor resolves. |
| Tracking | double (1/1000 em) | Supported | Inter-glyph spacing added to every advance. |
| Capitalization | Normal | SmallCaps | AllCaps | CapToSmallCap | Supported | AllCaps uppercases before shaping. |
| BaselineShift | double (pt) | Supported | Lifts (+) or drops (−) glyphs relative to the baseline. |
| HorizontalScale | double (%) | Supported | 100 = identity; folded into the glyph affine. |
| VerticalScale | double (%) | Parsed, not yet rendered | 100 = identity; per-glyph y-scale not yet applied. |
| Skew | double (deg) | Supported | Faux-italic slant, folded into the glyph affine. |
| Position | Normal | Superscript | Subscript | OTSuperscript | OTSubscript | Parsed, not yet rendered | Baseline position; captured but not yet scaled/shifted. |
| Underline | boolean | Supported | Underline decoration. |
| StrikeThru | boolean | Supported | Strike-through decoration. |
| Ligatures | boolean | Supported | Standard + contextual OpenType ligatures (liga, clig). Default at the bottom of the cascade is true. |
| KerningMethod | Metrics | Optical | None | Supported | Optical falls back to Metrics until the outline-driven pass lands. |
A local override beats the style
A run applies a character style by id, but it can also set an attribute directly on
its <CharacterStyleRange>. That local value is not part of the style sheet and
is not subject to BasedOn resolution — it simply wins. In the example below
both runs apply the same Emphasis style (which sets PointSize="12"), but the
second range adds PointSize="24" to itself; that run shapes at 24 pt while the
first stays at the style's 12.
Two runs, one character style — the second range overrides PointSize locally.
Stories/Story_ustory.xml<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<idPkg:Story xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging" DOMVersion="20.0">
<Story Self="ustory">
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/[No paragraph style]">
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Emphasis">
<Content>Emphasis as defined, </Content>
</CharacterStyleRange>
<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Emphasis" PointSize="24">
<Content>then PointSize overridden to 24 on the range.</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
</Story>
</idPkg:Story>
The full priority order — local value, then the applied character style's
resolved chain, then the paragraph style's resolved chain — is laid out in
conflict resolution. The run-level override
attributes are the same names as the style attributes above; the parser reads them
off the <CharacterStyleRange> itself.
Frequently asked questions
What is a character style for?
A character style formats a run — a span of text inside a paragraph — and usually
sets only the few attributes that differ from the surrounding text, such as a bold
face or a different colour. Everything it does not set is inherited from its
BasedOn parent and from the paragraph style the run sits in.
How does a run reference a character style?
A run names its character style through AppliedCharacterStyle, whose value is the
style's Self id. A run that wants nothing but the paragraph defaults applies the
[No character style] root.
Can a run override an attribute set by its character style?
Yes. A value set directly on the <CharacterStyleRange> is not part of the style
sheet and is not subject to BasedOn resolution — it simply wins. In the example
above, two runs apply the same Emphasis style but the second adds
PointSize="24" to its range, so it shapes at 24 pt while the first stays at the
style's 12.
Where does Leading come from if not the character style?
Leading is read from the run or range rather than from the <CharacterStyle>
element, so it is not one of the style attributes listed above.
Paragraph styles
The ParagraphStyle element and its key attributes — identity, the BasedOn parent, font and size defaults, alignment, indents, and spacing — plus the RootParagraphStyleGroup that holds them.
Object styles
The ObjectStyle element — the page-item analogue of paragraph and character styles — its fill, stroke, and corner attributes, the RootObjectStyleGroup, and the [None] default that every frame in the reference packages applies.