Page 1 of 1

PXC_DrawTextExW - difference with no space at end of string

Posted: Wed May 25, 2005 6:04 pm
by ken66
Sorry to keep bothering you, I hope that I am not annoying you.

I have attached my test Visual C++ 6 project again. This time PXC_DrawTextExW outputs a string differently if there is a space at the end of the string or not.

You will notice first write is using a string "Cable ID:" with no space after the colon (':'). Only the "Cable" portion of the string appears in the PDF file. The second write is using a string "Cable ID: " with a space after the colon (':'). The whole string appears in the PDF.

Is this a bug?

Posted: Thu May 26, 2005 10:02 am
by John - Tracker Supp
Hi Ken,

No problem.

This issue arises because you are using integer based arithmetic and our libraries - use floating point Arithmetic.

For example, our library returns a string width of 30.1 points, then you convert this to an integer value - the result - 30.0.

You then pass this length back to the library and there is not enough space to show the entire string (because the string width is 30.1 and not 30).

Hope that makes things a little clearer