W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > February 2011

[Bug 11342] The TextMetrics baseline must provide a baseline property

From: <bugzilla@jessica.w3.org>
Date: Thu, 03 Feb 2011 05:23:35 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1PkrfL-0007Mx-QT@jessica.w3.org>

--- Comment #6 from Charles Pritchard <chuck@jumis.com> 2011-02-03 05:23:35 UTC ---
(In reply to comment #5)
> That doesn't answer the question in comment 1. Which baseline? Could you
> provide a sample canvas script showing the problem?

My thinking was just to provide the baseline offset based on the current
setting of textBaseline. Usually, I'd grab the descent, based on alphabetic and
bottom (or top) metrics.

Here's an example script -- very hackish, but it shows an adjusted baseline
being used with the outline made via strokeRect. (I used CSS hacks to pull the


Were baseline information available, based on the setting of textBaseline, an
various baseline metrics could be pulled by switching textBaseline then running
measureText for each value (top, bottom, etc).

An image similar to the following could be generated; though that's not a
primary use case.

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Thursday, 3 February 2011 05:23:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:01:40 UTC