THPDFHeadlessTextOrder

THPDFHeadlessTextPositions = array of Integer;
THPDFHeadlessTextLevels = array of Byte;
THPDFHeadlessTextScripts = array of Cardinal;
THPDFHeadlessTextOrder = record
  VisualPositions: THPDFHeadlessTextPositions;
  Levels: THPDFHeadlessTextLevels;
  Scripts: THPDFHeadlessTextScripts;
  BaseRightToLeft: Boolean;
end;

Stores the actual Unicode paragraph order returned by HPDFResolveHeadlessTextOrder

VisualPositions maps each logical UTF-16 unit to a visual scalar position; Levels and Scripts classify the same unit for directional and script item boundaries

All arrays are managed dynamic arrays and have the same UTF-16 length; supplementary scalar pairs share their corresponding values

BaseRightToLeft reports the resolved base direction, independent of an individual item's embedding level