lineHeight

Glenn and all-

 

A cursory reading of TTML suggests lineHeight=fontSize.  But digging deeper
into XSL, one might reach different conclusions in red (also marked
“CONCLUSION”).

 

[TTML 8.2.12]:

 tts:lineHeight

If the value of this attribute is normal, then the initial value of the
style property must be considered to be the same as the largest font size
that applies to any descendant element.

….

The semantics of the style property represented by this attribute are based
upon that defined by [XSL 1.1], § 7.16.4. 

[XSL 7.16.4]: 

Normal: Tells user agents to set the computed value to a "reasonable" value
based on the font size of the element. The value has the same meaning as
<number>. We recommend a computed value for "normal" between 1.0 to 1.2.

<length>: The box height is set to this length.

 

CONCLUSION: Therefore as TTML states that a value of "normal" "must be
considered to be the same as the largest font size", I assume that the XSL
7.16.4 definition that is in effect is "<length>" with the value of the
largest font size.

 

[TTML 8.2.12] continued:

Furthermore, it is the intention of this specification that the allocation
rectangle of a line be consistent with the per-inline-height-rectangle as
defined by [XSL 1.1], § 4.5, i.e., that a CSS-style line box stacking
strategy be used.

 

[XSL 4.5]

The per-inline-height-rectangle for a line-area is the rectangle whose
start-edge and end-edge are parallel to and coincident with the start-edge
and end-edge of the nominal-requested-line-rectangle, and whose extent in
the block-progression-dimension is determined as follows.

….

The extent of the per-inline-height-rectangle in the
block-progression-direction is then defined to be the minimum required to
enclose both the expanded-nominal-requested-line-rectangle and the
expanded-rectangles of all the inline-areas stacked within the line-area;
this may vary depending on the descendants of the line-area.

….

The expanded-rectangle of an inline-area is the rectangle with start-edge
and end-edge coincident with those of its allocation-rectangle, and whose
before-edge and after-edge are outside those of its allocation-rectangle by
a distance equal to either (a.) the half-leading, when the area's
allocation-rectangle is specified to be the normal-allocation-rectangle by
the description of the generating formatting object , or (b.) the
space-before and space after (respectively), when the area's
allocation-rectangle is specified to be the large-allocation-rectangle. 

…..

The expanded-nominal-requested-line-rectangle is the rectangle with
start-edge and end-edge coincident with those of the
nominal-requested-line-rectangle, and whose before-edge and after-edge are
outside those of the nominal-requested-line-rectangle by a distance equal to
the half-leading.

……

The nominal-requested-line-rectangle for a line-area is the rectangle whose
start-edge is parallel to the start-edge of the content-rectangle of the
nearest ancestor reference-area and offset from it by the sum of the
start-indent and the start-intrusion-adjustment of the line area, whose
end-edge is parallel to the end-edge of the content-rectangle of the nearest
ancestor reference-area and offset from it by the sum of the end-indent and
the end-intrusion-adjustment of the line area, whose before-edge is
separated from the baseline-start-point by the text-altitude of the parent
block-area, and whose after-edge is separated from the baseline-start-point
by the text-depth of the parent block-area. It has the same
block-progression-dimension for each line-area child of a block-area.

…

[XSL 6.5.2]

The .minimum, .optimum, and .maximum components of the half-leading trait
are set to 1/2 the difference of the computed value of the line-height
property and the computed value of the sum of the text-altitude and
text-depth properties. The .precedence and .conditionality components are
copied from the line-height property.

 

CONCLUSION: Therefore lineHeight for each line of text in a TTML document is
given by: largest fontSize on the line + half leading == 1.5 * largest
fontSize

 

Is this right?  If not, where did I go wrong?

 

Thanks,

                Mike

 

Michael A DOLAN

TBT, Inc.    PO Box 190

Del Mar, CA 92014

(m) +1-858-882-7497

mdolan@newtbt.com

 

Received on Thursday, 22 August 2013 22:56:28 UTC