Hi Thomas.
Thomas Palfray:
> I'm trying to find the width of a String, but i've a little problem.
> in fact, i use getBBox() to find it, and it works ... but not in one case.
>
> I have two test String :
>
> "blabla bla"
> "blabla bla "
> getBBox() gives me the same length for the two String. It seems that it
> doesn't take the last blankspace.
If you want it to consider all spaces in the <text> element literally,
then you should set xml:space="preserve" on the element:
tmpText.setAttributeNS
("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve");
However, it seems that spaces at the start and end of the element don’t
contribute to the bounding box, even if xml:space="preserve". That
seems to be a bug, so I’ve filed this:
https://issues.apache.org/bugzilla/show_bug.cgi?id=46127
Replacing it with a non-breaking space (Š) doesn’t seem to help
either, unfortunately.
--
Cameron McCormack ≝ http://mcc.id.au/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]