W3C home > Mailing lists > Public > www-style@w3.org > January 2012

Re: [css3-text] Should text-shadow have 'spread'?

From: Simon Fraser <smfr@me.com>
Date: Mon, 23 Jan 2012 11:56:55 -0800
Cc: "www-style@w3.org list" <www-style@w3.org>
Message-id: <A09D39B6-27AD-487E-84E7-899D203427DC@me.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

On Jan 23, 2012, at 11:43 AM, Tab Atkins Jr. wrote:

> On Mon, Jan 23, 2012 at 11:26 AM, Simon Fraser <smfr@me.com> wrote:
>> I don't think 'spread' should apply to text-shadow, yet CSS3 Text suggests that text-shadow follows box-shadow <http://dev.w3.org/csswg/css3-text/#text-shadow>.
>> 
>> For rectangles and rounded-corner rectangles, 'spread' is easy to implement by insetting or outsetting the rectangle bounds. For arbitrary shapes, spread is vastly more difficult to implement, requiring either some complex path math, or pixel-based computations that are expensive to do at drawing time. There are also complexities related to whether spread makes sharp corners rounded etc.
> 
> WebKit already has text-stroke, which should be nearly the same thing
> as a spread.
> 
> If we don't have spread, authors will continue to hack it into working
> with 4 or 8 text-shadows, which has some visual glitches and isn't
> great for performance.

If we can define the rendering of text-shadow with 'spread' to be equivalent to shadowing text with an enlarged stroke value, then that's OK, but I'm afraid that might give unexpected results because of miter joins (resulting in long spiky bits), winding rules (resulting in unexpected holes) etc.

Simon
Received on Monday, 23 January 2012 19:57:26 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:48 GMT