Closed r12a closed 6 years ago
[reply by Glenn]
It is referring to the area tree produced in formatting. See XSL-FO for the conceptual model. The basic hierarchy in this local context is:
block area
line area
inline area
glyph area
A glyph area is an inline area, so this may reduce to the following depending on context:
block area
line area
glyph area
Thus, glyph areas are always descendants of a line area, and may have an intervening inline area or even an inline-block and inline area between the glyph area and the ancestor line area.
Note that XSL-FO classifies a line area as a special type of block area.
[my response]
So is it equivalent to a character? grapheme cluster? font glyph? something else? I'm trying to figure out what we're counting when looking for N.
[response from Nigel]
"Glyph area" itself is a term widely used in the spec, though there is no definition for it, since it is an XSL-FO concept - see https://www.w3.org/TR/2006/REC-xsl11-20061205/#d0e723
I see that for Ruby there are two classes of glyph area, spacing ones and non-spacing ones. Maybe it would also be an improvement to be explicit and say "the number of non-spacing glyph areas that are descendants of these inline areas" where that applies.
So is it equivalent to a character? grapheme cluster? font glyph? something else? I'm trying to figure out what we're counting when looking for N.
Looking at the fact that non-spacing glyphs are omitted from counting, that effectively leaves the other glyphs, or I suppose grapheme cluster would be equivalent, since for counting purposes it is irrelevant whether you include the non-spacing glyph areas or not, and the non-spacing ones would be combined into the same grapheme cluster.
In other words, "a" and "á" would both count as 1 whether you count the grapheme clusters or the spacing glyph areas. If you were to count all the glyph areas then "a" would be 1 and "á" would be 2.
We haven't discussed it but I assume the spec text for ruby is based on the glyph area counts rather than the other concepts you mention, since it is directly concerned with how the glyphs should be laid out.
[from here, discussion is moved to this issue]
10.2.34 tts:rubyAlign https://www.w3.org/TR/2016/WD-ttml2-20161117/#style-attribute-rubyAlign
Let IR and IB be, respectively, the inline areas generated by (1) a ruby text container or ruby text annotation and (2) an associated ruby base container or ruby base. Further, let NR and NB, be, respectively, the number of glyph area descendants of these inline areas.
If the value of this attribute is auto, then if NR equals NB, the semantics of withBase apply; otherwise, if NR is less than NB, the semantics of spaceAround or spaceBetween apply, respectively, according to whether NB is less than or equal to one (1) or is greater than one; otherwise (NR is greater than NB), the semantics of center apply.
I'm not sure how this works for the following cases:
The term glyph area is operationally defined by XSL-FO. The terms spacing and non-spacing are terms of art from the Unicode Standard, see, e.g., combining character, also used font specifications, e.g., OpenType Font.
As presently specified, the definition of glyph area is effectively implementation dependent. That may not be the best we can do, however, so let's consider where it is necessary to improve this.
First, in the context of Japanese text, this isn't a practical problem; however, in the general case, I agree it could be, as some of your examples demonstrate.
- the ruby annotation contains the text 'píng'. How many glyph areas is that? What if the annotation is 'píng píng'?
4 and 9, respectively
- the ruby annotation contains hindi text with conjuncts. Is the conjunct + vowel sign one glyph area? (Conjuncts may or may not be equivalent to grapheme clusters.)
a reasonable implementation would likely map a single grapheme cluster to a single glyph area for the purpose of counting ruby in this context
- the ruby annotation contains arabic text with the ligature lam-alif, composed of two font glyphs. Is this one glyph area or two?
a reasonable implementation would likely include all joined glyphs including any non-spacing marks that apply to them into a single glyph area for the purpose of counting ruby in this context; in other words, it would like extremely strange to separate otherwise joined glyphs or component glyphs
- the ruby annotation contains any arabic text, which is mostly joined up consonants. How many glyph areas is that?
see above
Merge editorial clarifications/elaborations from PR #314.
Reopening and moving to Group's WR action required list - @r12a please could you review the pull request and check that the editorial wording added does answer your question?
The Working Group just discussed Meaning of 'glyph area descendant' #236
, and agreed to the following resolutions:
RESOLUTION: Add "which is a" before "descendant".
RESOLUTION: Mark rubyAlign="withBase" as at risk for CR
Since we made some actionable resolutions when we discussed this, fixing the labels...
The Working Group just discussed Meaning of 'glyph area descendant' ttml2#236
.
[This was intended to be a quick query by email, but it is developing into a thread, so i'm copying the discussion here for ongoing discussion.]
my original question: I'm working on review comments for the ruby section, but i'm a bit stuck because i don't understand the meaning of the term 'glyph area descendant', and i don't see it described anywhere. Could one of you explain what that is? I think it will be important to understand it in order to assess the ruby section.