Re: [whatwg] Canvas textBaseline 'middle' conflicting definition

Wow, that is confusing. How can this be fixed without breaking existing web
content? Are browsers currently compliant with the canvas spec, or do they
implement the CSS definition of middle?


On Sun, Mar 30, 2014 at 3:11 PM, Dirk Schulze <dschulze@adobe.com> wrote:

> Hi,
>
> Canvas let you set alignment baselines with the textBaseline attribute [1].
>
> One of the baseline values is ‘middle’. The description of the ‘middle’
> baseline seems to be in conflict with the definition for the
> alignment-baseline property in CSS[2].
>
> Canvas: The middle of the em square
> CSS: [..] it may be computed using 1/2 the "x-height”
>
> What Canvas uses as middle is described as ‘center’ in CSS. Is there a way
> that we can change the naming and/or definition of ‘middle’ in Canvas?
>
> Greetings,
> Dirk
>
> [1]
> http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-textbaseline
> [2] http://www.w3.org/TR/SVG11/text.html#TextAlignmentProperties

Received on Monday, 31 March 2014 15:08:01 UTC