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

Re: Font Metrics concerns

From: John Daggett <jdaggett@mozilla.com>
Date: Mon, 9 Feb 2015 21:35:25 +0900
Message-ID: <CALYZoVPdPbRwf_3TjXXLqDUkTLgnbQ754LTo6vFkBvwm6+vG6Q@mail.gmail.com>
To: Stephen Zilles <szilles@adobe.com>
Cc: Alan Stearns <stearns@adobe.com>, Chris Lilley <chris@w3.org>, "Tab Atkins Jr." <jackalmage@gmail.com>, "public-houdini@w3.org" <public-houdini@w3.org>, Bram Stein <stein@adobe.com>
I don't think defining an API for font metrics is the right place to start.
First off, you're really probably talking about some form of *line* metrics
rather than actual font metrics. A linebox can be affected by both font
metrics and other factors such as the variation in font-size across a line
and other content (e.g. an image larger than the line height).

Even knowing the fonts used for specific glyph runs across a line does
*not* give you the information needed for proper placement.

Example:

  font-family: Arial, sans-serif;

  <p>カレー毎日食べたい</p>

In this case the line metrics will be those of Arial and not the fallback
font used to display the Japanese characters in the run.

Example:

  <p>x<sup>2</sup></p>

Here the placement of x will *not* be purely based on the font metrics used
for the 'x' character but will be affected by the linebox height when the
synthetic superscript is taken into account.

Cheers,

John
Received on Monday, 9 February 2015 12:35:53 UTC

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