HPDFComputeLineBreaks Function

function HPDFComputeLineBreaks(const Text: WideString; Sender: TObject;
  Tailor: THPDFLineBreakTailoringEvent): THPDFLineBreakOpportunities;

Computes default line-break opportunities for document paragraph composition and applies the caller's optional tailoring callback

On Delphi 2009 and later and supported FPC targets, the existing document interface consumes the complete Unicode 17 portable boundary engine and returns zero-based UTF-16 scalar offsets without surrogate-interior positions

The start remains prohibited with penalty 10000; the end of nonempty text remains mandatory with penalty -10000; empty input preserves the established single prohibited position at offset zero

Each interior scalar boundary invokes Tailor once with the original Sender, source Text, offset and default-resolved neighbouring classes, including combining-base inheritance and SA mark handling

The callback may alter the computed kind; callers should preserve mandatory line endings when applying application-specific typography

An allowed soft-hyphen opportunity requests hyphen insertion with penalty 50; a prohibited opportunity, including a callback prohibition or a following word joiner, cannot force hyphen insertion

Malformed UTF-16 or more than 1048576 code units raise EArgumentException on the Unicode 17 targets; earlier Delphi targets retain their existing compatibility implementation

Document tailoring property · Paragraph composition · Portable boundary API