W3C home > Mailing lists > Public > www-svg@w3.org > October 2015

IE11 and xml:space="preserve"

From: Smailus, Thomas O <Thomas.O.Smailus@boeing.com>
Date: Thu, 1 Oct 2015 20:24:26 +0000
To: "www-svg@w3.org" <www-svg@w3.org>
Message-ID: <175A0EE510663A46ACD5FF1A03AD46F51F141E02@XCH-BLV-204.nw.nos.boeing.com>
I'm finding that IE11 doesn't honor the request to preserve whitespace
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.

Thomas Smailus
Received on Thursday, 1 October 2015 20:25:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:55:03 UTC