W3C home > Mailing lists > Public > www-style@w3.org > July 2014

Re: [css-line-grid] What does "using the first available font" mean for line-grid: create

From: Alan Stearns <stearns@adobe.com>
Date: Mon, 7 Jul 2014 21:42:19 +0000
To: Bem Jones-Bey <bjonesbe@adobe.com>, www-style list <www-style@w3.org>
Message-ID: <CFE06098.41533%stearns@adobe.com>
On 5/29/14, 3:35 PM, "Bem Jones-Bey" <bjonesbe@adobe.com> wrote:

>The Line Grid Spec[1] defines the 'create' value for the line-grid
>property as follows:
>	Box creates a new line grid using its own font and line layout
>	settings. The line grid consists of a series of horizontal lines
>	corresponding to all the baselines (alphabetic, text-top, text-bottom,
>	mathematic, central, hanging, etc.) and to the line-over and line-under
>	edges, positioned where they would fall if the contents of this element
>	consisted entirely of line boxes filled with text (no sub-elements)
>	using the first available font. If the box is paginated, the line grid
>	is restarted on each page; since line boxes cannot be fragmented, no
>	page begins with the bottom part of a line's grid.
>It is unclear to me what "using the first available font" means in this
>context. Presumably, this refers to the font set on the box with the
>'line-grid: create' property, even if it does not directly contain text
>(of if it's descendants that contain text have a different font
>property.). I would also assume that the font metrics to use when
>computing this line grid come from those that are computed on the
>aforementioned box. Is this correct?

I think this is correct. You set up the line grid using the first
available font for the element where line-grid computes to ‘create’ -
whether or not the element contains any actual text.

>I do see that 'first available font' is defined in CSS Fonts[2]. Can it
>be assumed that Line Grid is using the same definition? If so, I find
>this definition to also be unclear:
>	The first available font, used in the definition of font-relative
>	lengths such as ‘ex’ and ‘ch’, is defined to be the first available
>	font that would match any character given font families in the
>	‘font-family’ list (or a user agent's default font if none are
>	available).
>What does "match any character" mean? Does it mean the first font found
>that has at least one glyph defined (can represent at least one
>character)? Or is there a character set that it needs to be able to

I am not entirely sure, but I’m assuming that ‘any’ in this context means
‘at least one.’ The ‘first available font’ is determined solely by
availability, not suitability to any particular content.

>Of course, this leads to the question of what the "first" font actually
>is. Is that specified somewhere, or is it implementation defined?

I’m assuming it means the first font in the font-family list.

>- Bem
>[1]: http://dev.w3.org/csswg/css-line-grid/

>[2]: http://dev.w3.org/csswg/css-fonts/#first-available-font

Received on Monday, 7 July 2014 21:42:59 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:44 UTC