Abstract

This document specifies two profiles of [TTML1]: a text-only profile and an image-only profile. These profiles are intended to be used across subtitle and caption delivery applications worldwide, thereby simplifying interoperability, consistent rendering and conversion to other subtitling and captioning formats. The text profile is a superset of [SDPUS].

Both profiles are based on [SUBM].

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This document was published by the Timed Text Working Group as a First Public Working Draft. This document is intended to become a W3C Recommendation. If you wish to make comments regarding this document, please send them to public-tt@w3.org (subscribe, archives) with [imsc] at the start of your email's subject. All comments are welcome.

Publication as a First Public Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Table of Contents

1. Scope

This document specifies two profiles of [TTML1]: a text-only profile and an image-only profile. These profiles are intended for subtitle and caption delivery worldwide, including dialog language translation, content description, captions for deaf and hard of hearing, etc.

The text-only profile is a strict superset of [SDPUS] and the image-only profile uses extensions specified in [ST2052-1].

2. Conformance

As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.

The key words MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL in this specification are to be interpreted as described in [RFC2119].

A subtitle document SHALL conform to a profile defined herein if it meets all normative provisions associated with the profile.

A TTML presentation processor SHALL conform to a profile if it is capable of presenting any subtitle document conforming to the profile, i.e. if it implements all features and provisions of the profile

3. Profiles

3.1 General

A subtitle document SHALL NOT conform to the Text and Image Profiles simultaneously.

3.2 Text Profile

A subtitle document conforming to the Text Profile SHALL conform to Sections 4. Common Constraints and 5. Text Profile Constraints.

3.3 Image Profile

A subtitle document conforming to the Image Profile SHALL conform to Sections 4. Common Constraints and 6. Image Profile Constraints.

4. Common Constraints

4.1 Document Encoding

A subtitle document SHALL use UTF-8 character encoding as specified in [UNICODE].

4.2 Namespaces

The following namespaces (see [xml-names]) are used in this specification:

Prefix Value Defining Specification
ttp http://www.w3.org/ns/ttml#parameter [TTML1]
tts http://www.w3.org/ns/ttml#styling [TTML1]
none http://www.w3.org/ns/ttml/feature/ [TTML1]
none http://www.w3.org/ns/ttml/extension/ [TTML1]
smpte http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt [ST2052-1]
none http://www.w3.org/ns/ttml/profile/imsc1/text 5.1 Profile Designator
none http://www.w3.org/ns/ttml/profile/imsc1/image 6.1 Profile Designator

The namespace prefix values defined above are for convenience and document instances may use any prefix value that conforms to [xml-names].

4.4 Synchronization

Each intermediate synchronic document of the subtitle document is intended to be displayed on a specific frame and removed on a specific frame of the related video object.

A media time expression M SHALL correspond to the frame of the related video object with the presentation time that is the closest to, but not less, than M.

If ttp:frameRate is specified, then the product of ttp:frameRate and ttp:frameRateMultiplier SHALL be the frame rate of the related video object.

4.5 Extensions

4.5.1 ttp:aspectRatio

The ttp:aspectRatio attributes allows authorial control of the mapping of the root container of a subtitle document to the related video object frame.

The root container of a subtitle document SHALL be mapped to the related video object frame according to the following:

  1. If ttp:aspectRatio is present, the root container SHALL be mapped to a rectangular area within the related video object such that:

    1. the aspect ratio of the rectangular area is equal to ttp:aspectRatio,
    2. the center of the rectangular area is colocated with the center of the related video object frame,
    3. the rectangular area (including its boundary) is entirely within the related video object frame (including its boundary), and
    4. the rectangular area has a height or width equal to that of the related video object frame.
  2. Otherwise, the root container of a subtitle document SHALL be mapped to the related video object frame in its entirety. If tts:extent is present on the tt element, the extents of the root container SHALL be equal to the dimensions of the related video object frame.

ttp:aspectRatio SHALL NOT be present if tts:extent is present.

Note

As specified in Section 4.8 Features, tts:extent is present if the px length measure is used anywhere within the document.

Integer pixel positions on the related video object frame computed from real percentage length values SHALL use half-up rounding, i.e. round(x) = floor(x+0.5).

4.5.2 ttp:progressivelyDecodable

A progressively decodable subtitle document is a subtitle document structured to facilitate processing before the document is received in its entirety. It shall conform to the following:

  1. elements appear in the document in increasing order according to their resolved begin time;
  2. no element references another element (i) occurring later in the document or (ii) with a later begin time; and
  3. a ttp:progressivelyDecodable attribute with value "true" is present on the tt element.

The ttp:progressivelyDecodable attribute shall conform to the following syntax:

imsc:progressivelyDecodable
  : "true"
  | "false"

The initial value of ttp:progressivelyDecodable shall be "false".

A ttp:progressivelyDecodable attribute with value "false" may be present on the tt element if the subtitle document is not a progressively decodable subtitle document.

A ttp:progressivelyDecodable attribute is considered to be significant only when specified on the tt element.

Note

The placement and use of div, region and span that contain time attributes, and (ii) the use of set.

4.5.3 tts:forcedDisplay

The tts:forcedDisplay signals that a block of subtitle content is identified as Forced subtitle content. Forced subtitle content is subtitle content that represents audio (e.g. foreign language) or text (e.g. a sign) that is not translated in the audio/video presentation.

Values: false | true
Initial: false
Applies to: body, div, p, region, span
Inherited: yes
Percentages: N/A
Animatable: discrete
Note

Although tts:forcedDisplay, like all the TTML style attributes, has no defined semantics on a br content element, forcedDisplayMode will apply to a br content element if it is either defined on an ancestor content element of the br content element or it is applied to a region element corresponding to a region that the br content element is being flowed into.

4.6 Region

4.6.1 Presented Region

A region, as defined in [TTML1], is presented in a given intermediate synchronic document if all of the following conditions are true:

  1. tts:opacity is not equal to "0.0" for the region; and

  2. tts:display is not "none"; and

  3. content is selected into the region or tts:showBackground is equal to "always" for the region.

Note

As specified in [TTML1], the initial value of tts:opacity is "1.0", the initial value of tts:showBackground is "always", and the initial value of tts:display is "auto"

4.6.2 Dimensions and Position

All regions SHALL NOT extend beyond the root container, i.e. the intersection of the sets of coordinates belonging to a region (including its boundary) and the sets of coordinates belonging to the root container (including its boundary) is the set of coordinates belonging to the region (including its boundary).

No two presented regions in a given intermediate synchronic document SHALL overlap, i.e. the intersection of the sets of coordinates within each region (including its boundary) is empty.

4.6.3 Maximum number

The number of presented regions in a given intermediate synchronic document SHALL NOT be greater than 4.

4.7 Hypothetical Render Model

Any sequence of consecutive intermediate synchronic documents SHALL be reproducible without error by the Hypothetical Render Model specified in Section 7. Hypothetical Render Model.

4.8 Features

Unless specified otherwise,a subtitle document SHALL conform to the following:

Feature Provisions
#animation MAY be used.
#cellResolution SHALL NOT be used.
#clockMode SHALL NOT be used.
#content MAY be used.
#core MAY be used.
#display-block MAY be used.
#display-inline MAY be used.
#display-region MAY be used.
#display MAY be used.
#dropMode SHALL NOT be used.
#extent-region MAY be used. The tts:extent attribute SHALL be present on all region elements.
#extent-root MAY be used. If the document includes any length value that uses the px expression, tts:extent SHALL be present on the tt element.
#extent MAY be used.
#frameRate If the document includes any time expression that uses the frame field, the ttp:frameRate attribute SHALL be present on the tt element.
#frameRateMultiplier MAY be used.
#layout MAY be used.
#length-cell SHALL NOT be used.
#length-integer MAY be used.
#length-negative SHALL NOT be used.
#length-percentage MAY be used.
#length-pixel MAY be used.
#length-positive MAY be used.
#length-real MAY be used.
#length MAY be used.
#markerMode SHALL NOT be used.
#metadata MAY be used.
#opacity MAY be used.
#origin MAY be used.
#overflow SHALL NOT be used.
#pixelAspectRatio SHALL NOT be used.
#presentation MAY be used.
#profile MAY be used.
#showBackground MAY be used.
#structure MAY be used.
#styling-chained MAY be used.
#styling-inheritance-content MAY be used.
#styling-inheritance-region MAY be used.
#styling-inline MAY be used.
#styling-nested MAY be used.
#styling-referential MAY be used.
#styling MAY be used.
#subFrameRate SHALL NOT be used.
#tickRate MAY be used. ttp:tickRate SHALL be present on the tt element if the #time-offset-with-ticks feature is used in the document.
#timeBase-clock SHALL NOT be used.
#timeBase-media SHALL be used. ttp:timeBase SHALL be present on the tt element and SHALL be equal to "media".
#timeBase-smpte SHALL NOT be used.
#time-clock-with-frames MAY be used.
#time-clock MAY be used.
#time-offset-with-frames MAY be used.
#time-offset-with-ticks MAY be used.
#time-offset MAY be used.
#timeContainer MAY be used.
#timing MAY be used. The same syntax of #clock-time or #offset-time SHOULD be used throughout the subtitle document.
#transformation MAY be used.
#unicodeBidi MAY be used.
#visibility-block MAY be used.
#visibility-inline MAY be used.
#visibility-region MAY be used.
#visibility MAY be used.
#writingMode-horizontal-lr MAY be used.
#writingMode-horizontal-rl MAY be used.
#writingMode-horizontal MAY be used.
#writingMode MAY be used.
#zIndex MAY be used.
Extension Provisions
http://www.w3.org/ns/ttml/extension/#aspectRatio MAY be used.
http://www.w3.org/ns/ttml/extension/#forcedDisplay MAY be used.
http://www.w3.org/ns/ttml/extension/#progressivelyDecodable MAY be used.
Note

As specified in [TTML1], a #time-offset-with-frames expression is translated to a media time M according to M = 3600 · hours + 60 · minutes + seconds + (frames ÷ (ttp:frameRateMultiplier · ttp:frameRate)).

5. Text Profile Constraints

5.1 Profile Designator

A subtitle document conforming to the Text Profile SHALL be associated with the following profile designator:

Profile Name Profile Designator
IMSC Text http://www.w3.org/ns/ttml/profile/imsc1/text

5.3 Features

The subtitle document SHALL conform to the following:

Feature Provisions
#backgroundColor-block MAY be used.
#backgroundColor-inline MAY be used.
#backgroundColor-region MAY be used.
#backgroundColor MAY be used.
#bidi MAY be used.
#color MAY be used. The initial value of tts:color SHALL be "white". NOTE: This is consistent with [ST2052-1].
#direction MAY be used.
#displayAlign MAY be used. The initial value of tts:displayAlign SHALL be "after" for the default region. NOTE: This is consistent with [ST2052-1].
#extent-region The tts:extent attribute when applied to a region element SHALL use px units or "percentage" representation, and SHALL NOT use em units.
#fontFamily-generic MAY be used. A tts:fontFamily of either "monospaceSerif" or "proportionalSansSerif" SHOULD be specified for all presented text content. A tts:fontFamily of "default" SHALL be equivalent to "monospaceSerif".
#fontFamily-non-generic MAY be used.
#fontFamily MAY be used.
#fontSize-anamorphic SHALL NOT be used.
#fontSize-isomorphic MAY be used.
#fontSize MAY be used.
#fontStyle-italic MAY be used.
#fontStyle-oblique MAY be used.
#fontStyle MAY be used.
#fontWeight-bold MAY be used.
#fontWeight MAY be used.
#image SHALL NOT be used.
#length-em MAY be used.
#lineBreak-uax14 MAY be used.
#lineHeight MAY be used.
An explicit <length> SHOULD be specified as there is no uniform implementation of the "normal" value at the time of this writing.
#nested-div MAY be used.
#nested-span MAY be used.
#origin The tts:origin attribute SHALL use px units or "percentage" representation, and SHALL NOT use em units.
#padding-1 MAY be used.
#padding-2 MAY be used.
#padding-3 MAY be used.
#padding-4 MAY be used.
#padding MAY be used.
#textAlign-absolute MAY be used.
#textAlign-relative MAY be used.
#textAlign MAY be used. The initial value of tts:textAlign SHALL be "center" for the default region. NOTE: This is consistent with [ST2052-1].
#textDecoration-over MAY be used.
#textDecoration-through MAY be used.
#textDecoration-under MAY be used.
#textDecoration MAY be used.
#textOutline-blurred SHALL NOT be used.
#textOutline-unblurred MAY be used.
#textOutline MAY be used. If specified, the border thickness SHALL be 10% or less than the associated font size.
#wrapOption MAY be used.
#writingMode-vertical MAY be used.
Extension Provisions
http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt#image SHALL NOT be used.

6. Image Profile Constraints

6.1 Profile Designator

A subtitle document conforming to the Image Profile SHALL be associated with the following profile designator:

Profile Name Profile Designator
IMSC Image http://www.w3.org/ns/ttml/profile/imsc1/image

6.2 Presented Image

6.2.1 Definition

A presented image is a div element with a smpte:backgroundImage attribute that does not extend beyond presented region.

6.2.2 Number per Region

In a given synchronic document, there shall be at most one presented image per presented region.

6.3 div element

If a tts:backgroundImage attribute is applied to a div element, the width and height of the region extent associated with the div element SHALL be specified and SHALL be equal to the width and height of the image source referenced by the tts:backgroundImage.

6.4 Features

The features included in a subtitle document SHALL conform to the Table below:

Feature Provisions
#bidi SHALL NOT be used.
#color SHALL NOT be used.
#content The p, span and br elements SHALL NOT be present.
#direction SHALL NOT be used.
#displayAlign SHALL NOT be used.
#fontFamily SHALL NOT be used.
#fontSize SHALL NOT be used.
#fontStyle SHALL NOT be used.
#fontWeight SHALL NOT be used.
#image SHALL NOT be used.
#length-em SHALL NOT be used.
#lineBreak-uax14 SHALL NOT be used.
#lineHeight SHALL NOT be used.
#nested-div SHALL NOT be used.
#nested-span SHALL NOT be used.
#padding SHALL NOT be used.
#textAlign SHALL NOT be used.
#textDecoration SHALL NOT be used.
#textOutline SHALL NOT be used.
#wrapOption SHALL NOT be used.
#writingMode-vertical SHALL NOT be used.
Extension Provisions
http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt#image smpte:backgroundImage MAY be used. The smpte:backgroundImage attribute SHALL reference a complete image that conforms to the PNG image coding as specified in Sections 7.1.1.3 and 15.1 of [MHP]. If a pHYs chunk is present, it SHALL indicate square pixels. Note: If no pixel aspect ratio is carried, the default of square pixels is assumed.
smpte:backgroundImageHorizontal and smpte:backgroundImageVertical SHALL NOT be used.
smpte:image SHALL NOT be used.

7. Hypothetical Render Model

7.1 Performance Model

7.1.1 Overview

This Section specifies the Hypothetical Render Model illustrated in Fig. 1 Hypothetical Render Model .

The purpose of the model is to limit subtitle document complexity. It is not however intended to serve as basis for implementation. For instance, while the model defines a glyph buffer for the purpose of limiting the number of glyphs displayed at any given point in time, it does not require an implementation to implement such a buffer.

Hypothetical Render Model
Fig. 1 Hypothetical Render Model

The model operates on successive intermediate synchronic documents obtained from an input subtitle document, and uses a simple double buffering model: while an intermediate synchronic document En is being painted into Presentation Buffer Pn (the "front buffer" of the model), the previous intermediate synchronic document En-1 is available for display in Presentation Buffer Pn-1 (the "back buffer" of the model).

The model specifies an (hypothetical) time required for completely painting an intermediate synchronic document as a proxy for complexity. Painting includes drawing region backgrounds, rendering and copying glyphs, and decoding and copying images. Complexity is then limited by requiring that painting of intermediate synchronic document En completes before the end of intermediate synchronic document En-1.

Whenever applicable, constraints are specified relative to root container dimensions, allowing subtitle sequences to be authored independently of related video object resolution.

To enables scenarios where the same glyphs are used in multiple successive intermediate synchronic documents, e.g. to convey a CEA-608/708-style roll-up (see [CEA-608] and [CEA-708]), the Glyph Buffers Gn and Gn-1 store rendered glyphs across intermediate synchronic documents, allowing glyphs to be copied into the Presentation Buffer instead of rendered, a more costly operation.

Similarly, Decoded Image Buffers Dn and Dn-1 store decoded images across intermediate synchronic documents, allowing images to be copied into the Presentation Buffer instead of decoded.

7.1.2 General

The Presentation Compositor SHALL render in Presentation Buffer Pn each successive intermediate synchronic document En using the following steps in order:

  1. clear the pixels, except for the first intermediate synchronic document E0 for the which the pixels of P0 SHALL be assumed to have been cleared;
  2. paint, according to stacking order, all background pixels for each region;
  3. paint all pixels for background colors associated with text or image subtitle content; and
  4. paint the text or image subtitle content.

The Presentation Compositor SHALL start rendering En:

  • at the presentation time of E0 minus Initial Painting Delay (IPD), if n = 0
  • at the presentation time of En-1, if n > 0

The duration DUR(En) for painting an intermediate synchronic document En in the Presentation Buffer Pn SHALL be:

DUR(En) = S(En) / BDraw + DURT(En) + DURI(En)

Where:

  • S(En) is the total normalized drawing area for intermediate synchronic document En, as specified in 7.1.3 Paint Regions
  • BDraw is the normalized background drawing performance factor.
  • DURT(En) is the duration, in seconds, for painting the text subtitle content for intermediate synchronic document En, as specified in Section 7.1.5 Paint Text
  • DURI(En) is the duration, in seconds, for painting the image subtitle content for intermediate synchronic document En, as specified in Section 7.1.4 Paint Images

The contents of the Presentation Buffer Pn SHALL be transferred instantaneously to Presentation Buffer Pn-1 at the presentation time of intermediate synchronic document En, making the latter available for display.

Note

It is possible for the contents of Presentation Buffer Pn-1 to never be displayed. This can happen if Presentation Buffer Pn is copied twice to Presentation Buffer Pn-1 between two consecutive video frame boundaries of the related video object.

It SHALL be an error for the Presentation Compositor to fail to complete painting pixels for En before the presentation time of En.

Unless specified otherwise, the following table SHALL specify values for IPD and BDraw.

Parameter Initial value
Initial Painting Delay (IPD) 1 s
Normalized background drawing performance factor (BDraw) 12 s-1
Note

BDraw effectively sets a limit on fillings regions - for example, assuming that the root container is ultimately rendered at 1920×1080 resolution, a BDraw of 12 s-1 would correspond to a fill rate of 1920×1080×12/s=23.7×220pixels s-1.

Note

IPD effectively sets a limit on the complexity of any given intermediate synchronic document.

7.1.3 Paint Regions

The total normalized drawing area S(En) for intermediate synchronic document En SHALL be

S(En) = CLEAR(En) + PAINT(En )

where CLEAR(E0) = 0 and CLEAR(En | n > 0) = 1, i.e. the root container in its entirety.

Note

To ensure consistency of the Presentation Buffer, a new intermediate synchronic document requires clearing of the root container.

PAINT(En) SHALL be the normalized area to be painted for all regions that are used in intermediate synchronic document En according to

PAINT(En) = ∑Ri∈Rp SIZE(Ri) ∙ NBG(Ri)

where R_p SHALL be the set of regions presented in the intermediate synchronic document En – see Section 4.6.1 Presented Region for the definition of presented region.

NSIZE(Ri) SHALL be given by:

NSIZE(Ri) = (width of Ri ∙ height of Ri ) ÷ (root container height ∙ root container width)

NBG(Ri) SHALL be the total number of tts:backgroundColor attributes associated with the given region Ri in the intermediate synchronic document. A tts:backgroundColor attribute is associated with a region when it is explicitly specified (either as an attribute in the element, or by reference to a declared style) in the following circumstances:

  • It is specified on the region layout element that defines the region.
  • It is specified on a div, p, span or br content element that is to be flowed into the region for presentation in the intermediate synchronic document (see [TTML1] for more details on when a content element is followed into a region).
  • It is specified on a set animation element that is to be applied to content elements that are to be flowed into the region for presentation in the intermediate synchronic document (see [TTML1] for more details on when a set animation element is applied to content elements).

Even if a specified tts:backgroundColor is the same as specified on the nearest ancestor content element or animation element, specifying any tts:backgroundColor SHALL require an additional fill operation for all region pixels.

7.1.4 Paint Images

The Presentation Compositor SHALL paint into the Presentation Buffer Pn all visible pixels of presented images of intermediate synchronic document En.

For each presented image, the Presentation Compositor SHALL either:

  • if an identical image is present in Decoded Image Buffer Dn, copy the image from Decoded Image Buffer Dn to the Presentation Buffer Pn using the Image Copier; or
  • if an identical image is present in Decoded Image Buffer Dn-1, i.e. an identical image was present in intermediate synchronic document En-1, copy using the Image Copier the glyph from Decoded Image Buffer Dn-1 to both the Decoded Image Buffer Dn and the Presentation Buffer Pn; or
  • Otherwise, decode the image using the Image Decoder the image into the Presentation Buffer Pn and Decoded Image Buffer Dn.

Two images SHALL be identical if and only if they reference the same encoded image source.

The duration DURI(En) for painting images of an intermediate synchronic document En in the Presentation Buffer SHALL be as follows:

DURI(En) = ∑Ii ∈ Ic NRGA(Ii) / ICpy + ∑Ij ∈ Id NSIZ(Ij) / IDec

where

  • Ic is the set of images copied when painting intermediate synchronic document En
  • Id is the set of images decoded when painting intermediate synchronic document En
  • IDec is the image decoding rate
  • ICpy is the normalized image copy performance factor.

NRGA(Ii) is the Normalized Image Area of presented image Ii and SHALL be equal to:

NRGA(Ii)= (width of Ii ) ∙ height of Ii ) ÷ ( root container height ∙ root container width )

NSIZ(Ii) SHALL be the number of pixels of presented image Ii.

The contents of the Decoded Image Buffer Dn SHALL be transferred instantaneously to Decoded Image Buffer Dn-1 at the presentation time of intermediate synchronic document En.

The total size occupied by images stored in Decoded Image Buffers Dn or Dn-1 SHALL be the sum of their Normalized Image Area.

The size of Decoded Image Buffers Dn or Dn-1 SHALL be the Normalized Decoded Image Buffer Size (NDIBS).

Unless specified otherwise, the following table SHALL specify ICpy, Idec, and NDBIS.

Parameter Initial value
Normalized image copy performance factor (ICpy) 6
Image Decoding rate (Idec) 1 × 220 pixels s-1
Normalized Decoded Image Buffer Size (NDIBS) 0.9885

7.1.5 Paint Text

For each glyph displayed in intermediate synchronic document En, the Presentation Compositor SHALL:

  • if an identical glyph is present in Glyph Buffer Gn, copy the glyph from Glyph Buffer Gn to the Presentation Buffer Pn using the Glyph Copier; or
  • if an identical glyph is present in Glyph Buffer Gn-1, i.e. an identical glyph was present in intermediate synchronic document En-1, copy using the Glyph Copier the glyph from Glyph Buffer Gn-1 to both the Glyph Buffer Gn and the Presentation Buffer Pn; or
  • Otherwise render using the Glyph Renderer the glyph into the Presentation Buffer Pn and Glyph Buffer Gn using the corresponding style information.

Two glyphs are identical if and only if the following [TTML1] styles are identical:

  • tts:color
  • tts:fontFamily
  • tts:fontSize
  • tts:fontStyle
  • tts:fontWeight
  • tts:textDecoration
  • tts:textOutline
Example of Presentation Compositor Behavior for Text Rendering
Fig. 2 Example of Presentation Compositor Behavior for Text Rendering

The duration DURT(En) for painting the text of an intermediate synchronic document En in the Presentation Buffer is as follows:

DURT(En) = ∑Gi ∈ Gr NRGA(Gi) / Ren(Gi) + ∑Gj ∈ Gc NRGA(Gj) / GCpy

Where:

  • Gr is the set of glyphs rendered into the Presentation Buffer Pn using the Glyph Renderer in intermediate synchronic document En.
  • Gc is the set of glyphs copied to the Presentation Buffer Pn using the Glyph Copier in intermediate synchronic document En.
  • Ren(Gi) is the text rendering performance factor glyph Gi
  • GCpy is the normalized glyph copy performance factor

Gr and Gc SHALL include only glyphs in presented regions and SHALL NOT include a [UNICODE] Code Point if it does not result in a change to presentation, e.g. the Code Point is ignored.

The Normalized Rendered Glyph Area NRGA(Gi) of a glyph Gi SHALL be equal to:

NRGA(Gi)= (fontSize of Gi as percentage of root container height)2

The contents of the Glyph Buffer Gn SHALL be copied instantaneously to Glyph Buffer Gn-1 at the presentation time of intermediate synchronic document En.

The total size occupied by the glyphs stored in Glyph Buffers Gn or Gn-1 SHALL be the sum of their Normalized Rendered Glyph Area.

The size of Glyph Buffers Gn and Gn-1 SHALL be the Normalized Glyph Buffer Size (NGBS).

Unless specified otherwise, the following table SHALL specify GCpy, Ren and NGBS, and SHALL apply to all supported font styles (including provision of outline border).

Parameter Initial value
Normalized glyph copy performance factor (GCpy) 12
Text rendering performance factor Ren(Gi if Gi is not a CJK Unified Ideograph as specified in [UNICODE]. 1.2
Text rendering performance factor Ren(Gi) if Gi is a CJK Unified Ideograph as specified in [UNICODE]. 0.6
Normalized Glyph Buffer Size (NGBS) 1
Note

NRGA(Gi) does not take into account glyph decorations (e.g. underline), glyph effects (e.g. outline) or actual glyph aspect ratio. An implementation can determine an actual buffer size needs based on worst-case glyph size complexity.

7.2 Reference Fonts

The height and width of the area occupied by text within a region depend on line height as well as the width of, and spacing between (kerning), individual glyphs. The following allows the area occupied by text to be closely determined, and thus the region extent to be set such that text flows without clipping.

A glyph that matches one of the combinations of computed font family and code point listed in the table below SHALL be laid out using metrics equal to the metrics of the specified reference font, unless the glyph is not defined by the reference font.

Computed Font Family Code Points Reference Font
monospaceSerif All code points specified in A. Recommended Character Sets http://www.microsoft.com/typography/fonts/family.aspx?FID=10 (Courier New)
proportionalSansSerif All code points specified in A. Recommended Character Sets, excluding the code points defined for Semitic languages alone. http://www.microsoft.com/typography/fonts/family.aspx?FID=8 (Arial) or http://www.linotype.com/en/526/Helvetica-family.html (Helvetica)
Note

Implementations can use use fonts other than those specified above. Two fonts with equal metrics can have a different appearance, but flow identically.

Note

proportionalSansSerif is not used in practice for Hebrew and Arabic captions and subtitles.

B. Extensions

B.1 General

The following sections define extension designations, expressed as relative URIs (fragment identifiers) with respect to the TT Extension Namespace base URI (see [TTML1].

B.2 #progressivelyDecodable

A TTML transformation processor supports the #progressivelyDecodable feature if it recognizes and is capable of transforming values of the ttp:progressivelyDecodable.

A TTML presentation processor supports the #progressivelyDecodable feature if it implements presentation semantic support for values of the ttp:progressivelyDecodable attribute.

B.3 #aspectRatio

A TTML transformation processor supports the #aspectRatio feature if it recognizes and is capable of transforming values of the ttp:aspectRatio.

A TTML presentation processor supports the #aspectRatio feature if it implements presentation semantic support for values of the ttp:aspectRatio attribute.

B.4 #forcedDisplay

A TTML transformation processor supports the #forcedDisplay feature if it recognizes and is capable of transforming values of the tts:forcedDisplay.

A TTML presentation processor supports the #forcedDisplay feature if it implements presentation semantic support for values of the tts:forcedDisplay attribute.

B.5 http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt#image

The http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt#image extension is specified in [ST2052-1].

C. References

C.1 Normative references

[CLDR]
Unicode Consortium. The Common Locale Data Repository Project
[MHP]
ETSI TS 101 812 V1.3.1, Digital Video Broadcasting (DVB); Multimedia Home
[RFC2119]
S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. March 1997. Internet RFC 2119. URL: http://www.ietf.org/rfc/rfc2119.txt
[ST2052-1]
SMPTE ST 2052-1, Timed Text Format (SMPTE-TT)
[TTML1]
Glenn Adams, Ed., Timed Text Markup Language 1 (TTML1) (Second Edition), W3C Recommendation, 24 September 2013. URL: http://www.w3.org/TR/2013/REC-ttml1-20130924/
[UNICODE]
The Unicode Standard. URL: http://www.unicode.org/versions/latest/
[xml-names]
Tim Bray; Dave Hollander; Andrew Layman; Richard Tobin; Henry Thompson et al. Namespaces in XML 1.0 (Third Edition). 8 December 2009. W3C Recommendation. URL: http://www.w3.org/TR/xml-names

C.2 Informative references

[CEA-608]
Line-21 Data Services, ANSI/CEA Standard.
[CEA-708]
Digital Television (DTV) Closed Captioning, ANSI/CEA Standard.
[SDPUS]
World Wide Web Consortium (W3C). TTML Simple Delivery Profile for Closed Captions (US) (W3C Working Group Note, 05 February 2013)
[SUBM]
World Wide Web Consortium (W3C). TTML Text and Image Profiles for Internet Media Subtitles and Captions (Member Submission, 07 June 2013)