Measuring text gives wrong answer if more than one space is in the text being measured

I have attached a sample project.

The problem shows up in line 53:

outBounds = p_pdf->Graphics()->DrawText("Test Date: 12-16-2022", pageBounds.Location, true);

When executed, the output stops at the colon (test_01.pdf). If you replace the space after the colon with an underscore, the output contains all of the expected text (test_02.pdf).

The code is written in C++, 64 bit target, Rad Studio 11.2.
PDF.zip (10.5 KB)
test_01.pdf (148.0 KB)
test_02.pdf (151.3 KB)

At first sight, this seems to be a decimal rounding issue, can you try the following code:

width = ceil(outBounds.Width());