SetTextFlowDropCap

Text and typography

Description

Configures an initial multi-line drop cap on a text flow so the first characters of the flow are rendered at an enlarged size spanning multiple lines while adjacent body lines indent around them

Syntax

Delphi

Function TPDFlib.SetTextFlowDropCap(FlowID, LineSpan, CharCount: Integer): Integer;

Parameters

FlowIDA text flow identifier returned by NewTextFlow
LineSpanNumber of body lines spanned by the drop cap (pass 2 or greater to enable, or 0 to disable)
CharCountNumber of initial characters included in the drop cap (clamped to at least 1 when enabled)

Return values

1The drop cap configuration was applied to the text flow
0The FlowID was invalid

Remarks

The character count consumes supported text clusters rather than isolated UTF-16 code units, keeping surrogate pairs, combining marks, emoji modifiers, regional-indicator pairs, explicit joiner sequences and variation selectors together; see NewTextFlow for the bounded Unicode support

If the first target box passed to DrawTextFlow is too short to fit the drop cap span and at least one body line, consumption is deferred so the next target box renders the drop cap intact

See also

NewTextFlow, DrawTextFlow, SetTextFlowAlignment, AddTextFlowObstacle