MeasureText

procedure MeasureText(const text: string; fontInfo: TFontInfo; out bounds: TRectD; out charOffsets: TArrayOfPointD);

Returns the bounding rectangle of the text. MeasureText also the returns via 'charOffsets' the starting offset of each character in text, PLUS the offset at the very end of the text where further text may be positioned.
Hence NextTextStartPos := charOffsets[Length(text)];