Word Wrap is ignoring Line Spacing on the TOC

Greetings,

I have an issue with the TOC where the line spacing on word wrap is ignored when the text is at certain lengths. When the heading text is longer this does not occur. See image:
image.png (16.6 KB)

This code replicates the issue:

Aspose.Pdf.License asposeLicense = new Aspose.Pdf.License();
asposeLicense.SetLicense("Aspose.Total.NET.lic");

var pdfDocument = new Aspose.Pdf.Document();
Aspose.Pdf.Page tocPage = pdfDocument.Pages.Add();
TocInfo tocInfo = new TocInfo();
tocInfo.Title = new TextFragment("Table of Contents Page");
tocPage.TocInfo = tocInfo;

// Broken
TextSegment textSeg = new TextSegment();
textSeg.Text = "1 - This text should have line spacing when it wraps asdf asdf asdf asdf asdf asdf as";
textSeg.TextState.FontSize = 11;
textSeg.TextState.LineSpacing = (float)1.5 * 12;

Heading tocHeading = new Heading(2);
tocHeading.TocPage = tocPage;
tocHeading.Segments.Add(textSeg);
tocHeading.DestinationPage = pdfDocument.Pages[1];
tocPage.Paragraphs.Add(tocHeading);

// Working
TextSegment textSeg2 = new TextSegment();
textSeg2.Text = "2 - This text will have line spacing when it wraps asdf asdf asdf asdf asdf asdf asdf asdf";
textSeg2.TextState.FontSize = 11;
textSeg2.TextState.LineSpacing = (float)1.5 * 12;

Heading tocHeading2 = new Heading(2);
tocHeading2.TocPage = tocPage;
tocHeading2.Segments.Add(textSeg2);
tocHeading2.DestinationPage = pdfDocument.Pages[1];
tocPage.Paragraphs.Add(tocHeading2);

pdfDocument.Save("output.pdf");

Any help would be greatly appreciated.
Cheers,
Jordan

@dockworker
Thank you for writing to us and making such a simple and illustrative example.
I will create a task for the development team about this.

@dockworker
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-57459

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.