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 handed back by HPDFResolveHeadlessTextOrder

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

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

BaseRightToLeft reports the resolved base direction, independently of any individual item's embedding level