Re: [whatwg] [2D Canvas] Do canvases in documents without a browsing context need to be rendered?

On Thu, Mar 6, 2014 at 1:17 PM, Ian Hickson <ian@hixie.ch> wrote:

> On Wed, 5 Mar 2014, Rik Cabanier wrote:
> >
> > Testing all browsers (except IE since
> > document.implementation.createHTMLDocument() doesn't work) they seem to
> > handle canvas contexts with no browsing context except when you use
> > text. Chrome crashes, firefox throws an exception and Safari draws the
> > text with a very small scale [1]
>
> The spec actually defines what happens with fonts when you don't have a
> defined computed style:
>
> # If the computed values are undefined for a particular case (e.g. because
> # the font style source object is not an element or is not being
> # rendered), then the relative keywords must be interpreted relative to
> # the normal-weight 10px sans-serif default.
>
> This is needed for text rendering in Workers, if nothing else.
>

Ah! So that clears it up... almost.
How do we interpret that for Path objects? Does adding text to a path count
as a case where font style is undefined, or do we defer and resolve the
font style when the path object is drawn to a canvas?


> --
> Ian Hickson               U+1047E                )\._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
>

Received on Thursday, 6 March 2014 18:37:40 UTC