Docsv3.31.0
Back to API Reference
Class

AlignmentModifier

sealed
Inherits:BaseModifier

Sets horizontal alignment, justify mode, and last-line alignment for the paragraphs it covers. Apply whole-text or per range/tag — each paragraph can differ.

Remarks

A table or other block standing wholly in a range aligns with it as a whole, unless its owner sets its own placement. Lines inside a block's cells keep the alignment the block gives them; only a range starting inside a cell aligns its lines. A range whose rule places it at a nesting depth aligns the lines and blocks of the flows at that depth alone, wherever its start falls.
public HorizontalAlignment Align{ get; set }

Horizontal alignment default. A per-range value overrides it; this is the default for a bare tag or whole-text use.

public TextJustify Justify{ get; set }

Justify mode default. A per-range value overrides it; this is the default for a bare tag or whole-text use.

public LastLineAlignment LastLine{ get; set }

Last-line alignment default. A per-range value overrides it; this is the default for a bare tag or whole-text use.

public float WordSpacingMin{ get; set }

Smallest word-separator width under justification, in percent of natural width.

public float WordSpacingMax{ get; set }

Largest word-separator width justification spends before the letter and glyph levers, in percent of natural width.

public float LetterSpacingMin{ get; set }

Largest letter-spacing reduction justification may spend, in percent of em.

public float LetterSpacingMax{ get; set }

Largest letter-spacing addition justification may spend, in percent of em.

public float GlyphScalingMin{ get; set }

Smallest glyph width under justification, in percent. 100 disables compression.

public float GlyphScalingMax{ get; set }

Largest glyph width under justification, in percent. 100 disables expansion.

protected override void OnEnable()
protected override void OnDisable()
protected override void OnDestroy()
protected override void BeforeApply()
protected override void OnApply(in RangeApplyContext context)