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

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

From: Bem Jones-Bey <bjonesbe@adobe.com>
Date: Thu, 29 May 2014 22:35:39 +0000
To: www-style list <www-style@w3.org>
Message-ID: <9A713CA3-FE2A-4B82-B66F-9D3AE36EE74B@adobe.com>
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 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

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 represent?

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

- Bem

[1]: http://dev.w3.org/csswg/css-line-grid/
[2]: http://dev.w3.org/csswg/css-fonts/#first-available-font
Received on Thursday, 29 May 2014 22:36:12 UTC

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