Hi,
we discovered some issues with function TextOut() when strings with leading spaces shall be printed:
- If the string to be printed with Canvas->TextOut() contains leading blanks, only the first blank is displayed with the background color set in Canvas->Brush->Color and the remaining string is displayed with the standard background color (white).
Conclusion: It is not possible to print a string with leading spaces in a different color than white. - If the Canvas->Font->Style (FontStyle) contains fsUnderline then the first (underlined) blank of the leading blanks is printed at a wrong position (much too below with a wrong Y position). The following blanks then are displayed at the correct position.
To workaround this issue we decided to replace the leading blanks by non-breakable blanks (U+00A0) which are displayed at the correct position. But this resolution has a drawback concerning the alignment of the printed lines if the widths of the "usual" blank (U+0020) and the non-breakable blank (U+00A0) are different.
These issues were evaluated with wPDF V4.75.1 used with C++ Builder 10.3.1.
Maybe they could be fixed in the next relase of wPDF!?
Best regards,
Michael