W3C home > Mailing lists > Public > public-svg-wg@w3.org > January to March 2009

Re: text-ws-02-t and nbsp glyph

From: Erik Dahlström <ed@opera.com>
Date: Mon, 09 Feb 2009 09:29:25 +0100
To: "Cameron McCormack" <cam@mcc.id.au>, public-svg-wg@w3.org
Message-ID: <op.uo2sjbztdhsuf5@gnorps.linkoping.osa>

On Sun, 08 Feb 2009 23:57:39 +0100, Cameron McCormack <cam@mcc.id.au> wrote:

> Erik Dahlström:
>> I wonder if the text-ws-02-t.svg[2] test is correct.
>> The testcase text-ws-02-t.svg[2] uses the SVGFreeSansASCII font,
>> which doesn't have a glyph for the nonbreaking space. This causes a
>> fontswitch in Opera, and the second line therefore looks different
>> from the first line.
> Same in Batik.  The NBSP glyphs are rendered with a different font,
> resulting in the spaces between the words being different.
>> Should an SVGFont claim to have the nonbreaking-space glyph even
>> though it doesn't if there is a space glyph?
> No, I don’t believe it should.

Right, though I guess some implementations must have done something like that judging by the 1.2T implementation report. Possibly the test could be passed if 'sans-serif' evaluated to a font that had the same advance for nbsp as the svgfont space, e.g Vera Sans.

>> I think the test should either not use nbsp or we need to add the nbsp
>> glyph to the SVGFreeSansASCII font.
> I agree.  I guess it would be slightly better to keep the use of the
> NBSPs and add that glyph to the font, since we don’t want the test to
> have a false positive if runs of normal space characters get mistakenly
> collapsed when xml:space="preserve", or something.

I've now added the nbsp glyph to profiles/1.2T/test/images/SVGFreeSans.svg, and the text-ws-02-t.svg test passes in Opera.


Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Monday, 9 February 2009 08:28:22 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:20:10 UTC