Re: [whatwg] 2D canvas feature proposal: text decoration

On Fri, Sep 27, 2013 at 5:05 PM, Ian Hickson <ian@hixie.ch> wrote:

>
> > Text decoration can theoretically be drawn directly by the application
> > by using font metrics to compute decoration positions, but this is often
> > very complex to do correctly in a truly portable way.
>
> We could add underline metrics to TextMetrics if that would help.
>
> Perhaps that would be the right solution, but I don't know enough about
metrics to authoritatively state what information is missing. The fact that
most browsers do not fully support the text metrics as currently spec'ed
does not help either (I know, Chrome is one of the worst offenders w.r.t.
metrics support).


>
> If doing things with CSS and the DOM is
> too slow, then we should fix that, we shouldn't just tell people to
> rewrite their apps in <canvas>.
>

Easier said than done.  In theory, it should be possible to obtain
canvas-like performance when DOM usage is constrained to styles that make
layout calculations trivial (as in no-op). However, this is still a more or
less unsolved problem despite the best efforts of a large number of very
smart people.  Let's not hold our breaths.


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

Received on Monday, 30 September 2013 21:18:26 UTC