W3C home > Mailing lists > Public > public-houdini@w3.org > February 2015

Font Metrics concerns

From: Alan Stearns <stearns@adobe.com>
Date: Sun, 8 Feb 2015 02:45:02 +0000
To: "public-houdini@w3.org" <public-houdini@w3.org>
CC: John Daggett <jdaggett@mozilla.com>, Bram Stein <stein@adobe.com>
Message-ID: <D0FD18DA.23B61%stearns@adobe.com>
So we’ve resolved to create a spec for a font interface that contains font
metrics information necessary [1] for script to produce interesting
typographic effects (drop caps, baseline grids, etc.) I have some initial
thoughts about how this information should be exposed, and some concern
about how we should rationalize what’s currently specified for canvas
TextMetrics [2].

There are quite a few metrics we could expose. I don’t know that it’s
necessary to include every possible metric in the first cut of this
interface. It seems to me that we could start with a reasonable subset and
add more information as needed. I think a reasonable subset would include:

alphabetic baseline
hanging baseline
ideographic baseline
x height
cap height

Steve warned that there are several different meanings for ‘ascent’ and
‘descent’ in different fonts. So I assume this interface should pick one
and describe how to translate known differences to what the interface

The TextMetrics interface has attributes for some of these metrics in CSS
pixel units. This makes sense for the canvas measurements being made by
that interface, but I’m thinking the font interface we’re designing should
be expressed in more abstract units. One possibility is to add a
unitsPerEm attribute and express all the other metrics in those
font-specific units. That’s probably the most natural thing to do for
typographers. But I think it could also work to rationalize on a single
unitsPerEm value or use an em percentage.



[1] but not sufficient - used font and rendered baseline position is also
[2] https://html.spec.whatwg.org/multipage/scripting.html#textmetrics

Received on Sunday, 8 February 2015 02:45:34 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 15:47:05 UTC