This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27690 - Problematic definition of TextMetrics.emHeightDescent
Summary: Problematic definition of TextMetrics.emHeightDescent
Status: NEW
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML Canvas 2D Context (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Jay Munro
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-24 09:57 UTC by Moti Zilberman
Modified: 2014-12-24 09:57 UTC (History)
3 users (show)

See Also:


Attachments

Description Moti Zilberman 2014-12-24 09:57:22 UTC
Quoting the current spec and adding my own comments inline:

> emHeightDescent attribute
...
> positive numbers indicating that the given baseline is below the bottom of that em square

This breaks the following convention otherwise followed by all Ascent/Descent attribute pairs:
Ascent = positive numbers indicating a distance going up
Descent = positive numbers indicating a distance going down
(Thus Ascent+Descent = Height in a sense)

I propose that emHeightDescent be brought in line with this convention.

> (Zero if the given baseline is the top of that em square.)
This was probably meant to say "bottom".

To give some context - I am the author of https://github.com/motiz88/canvas-text-metrics-polyfill and actively working on bringing conforming measureText implementations to Chrome and Firefox (Chrome Canary has it, behind a flag and with some issues).