- From: Erik Dahlström <erik@xn--dahlstrm-t4a.net>
- Date: Thu, 01 Oct 2015 22:59:12 +0200
- To: "www-svg@w3.org" <www-svg@w3.org>, "Smailus, Thomas O" <Thomas.O.Smailus@boeing.com>
On Thu, 01 Oct 2015 22:24:26 +0200, Smailus, Thomas O <Thomas.O.Smailus@boeing.com> wrote: > I'm finding that IE11 doesn't honor the request to preserve whitespace > OR > the getBBox() function applied to text/tspan containing extra whitespace > is not computing the bounding box as expected (by giving the whitespace > content contributing extent) > > <tspan font-family="arial" fill="rgb(0,0,0)" font-size="2.02847" > >AIRSPEED - 111 TO 999 KCAS RECOMMENDED (NOT LESS THAN V </tspan> > > Contained within the <text> element is reporting/rendering as if the > extra spaces after the "V" were not there or don't contribute to the > bounding box computation. > > The document has xml:space="preserve" declared in the <svg > tag > > As a work-around, I'm replacing all space characters with non-breaking > spaces, but that, as one can imagine, makes a mess of doing text > search/matching across the DOM. That sounds painful. Have you tried using "white-space: pre" instead of xml:space? Testcase: http://jsfiddle.net/jhprc28v/ Cheers /Erik
Received on Thursday, 1 October 2015 20:59:40 UTC