### TTML2 Common Caption Style Examples
Source: https://www.w3.org/TR/ttml2/index
Provides examples of common caption styling techniques used in TTML2, such as pop-on, roll-up, and paint-on captions.
```APIDOC
Common Caption Style Examples:
Pop-On Caption Example: Demonstrates the pop-on caption style.
Roll-Up Caption Example: Illustrates the roll-up caption style.
Paint-On Caption Example: Shows the paint-on caption style.
```
--------------------------------
### TTML2 tts:textShadow Example
Source: https://www.w3.org/TR/ttml2/index
An example demonstrating the use of the tts:textShadow attribute to apply a lime-colored shadow with specific offsets and blur to a span of text.
```XML
I serve it with greens in those
shadowy scenes, First paragraph Second paragraph
And I use it for striking a light:
```
--------------------------------
### TTML2 Region Style Animation Example
Source: https://www.w3.org/TR/ttml2/index
Illustrates the basic structure for using the 'set' element to animate region styling, although the example is incomplete.
```XML
...
```
--------------------------------
### TTML2 Media Timing Example 2
Source: https://www.w3.org/TR/ttml2/index
A second TTML2 fragment illustrating media timing. This example shows how the computed document times are shifted to align with media times, resulting in different absolute begin and end times for the content.
```xml
...
And then there were none.
``` -------------------------------- ### Pop-On Caption Example in TTML Source: https://www.w3.org/TR/ttml2/index Demonstrates the implementation of Pop-On captions using TTML. This example showcases how to define regions, time content, and style captions for a pop-on effect, where captions appear simultaneously and remain on screen for their duration. ```xmlLorem ipsum dolor sit
Amet consectetur adipiscing elit
Sed do eiusmod tempor incididunt labore
et dolore magna aliqua
Ut enim ad minim veniam quis, nostrud
First paragraph
Second paragraph
The sea was wet as wet
could be,
The sand was dry as dry.
There weren't any
You couldn't
could not see a cloud
Because no cloud was in the sky.
Text 1
Text 2
Text 3
Text 4
This division has a content image that appears as a block area after this paragraph.
This division has a background image that appears under this paragraph.
...
山の
最多1998年
山の
最多1998年
あい AB34三四
あい AB34三四
``` -------------------------------- ### TTML2 Origin Feature Source: https://www.w3.org/TR/ttml2/index Documentation for the TTML2 origin feature, which defines the starting point for layout and positioning within a document or region. ```APIDOC origin: Description: Specifies the origin point for layout and positioning. Applies to: Regions and elements. Reference: https://www.w3.org/TR/ttml2/#feature-origin ``` -------------------------------- ### TTML2 Roll-Up Caption Example Source: https://www.w3.org/TR/ttml2/index Demonstrates roll-up captions in TTML2, achieved through overlapped time intervals for paragraphs. This example shows how multiple lines can appear and disappear smoothly or discretely. ```xml
Lorem ipsum dolor sit
Amet consectetur adipiscing elit
Sed do eiusmod tempor incididunt labore
et dolore magna aliqua
Ut enim ad minim veniam quis, nostrud
I travel, a sort of licensed troubleshooter.
...
山の遭難そうなん
最多さいた年ねん
山の遭難そうなん
最多さいた年ねん
Just the place for a Snark! I have said it twice: That alone should encourage the crew. Just the place for a Snark! I have said it thrice: What I tell you three times is true.
``` -------------------------------- ### TTML2 Element Metadata Example Source: https://www.w3.org/TR/ttml2/index Demonstrates the use of the 'metadata' element within a content element (e.g.,
Lorem ipsum dolor sit
Amet consectetur adipiscing elit
Sed do eiusmod tempor incididunt labore
et dolore magna aliqua
Ut enim ad minim veniam quis, nostrud
White 1 Yellow White 2
``` -------------------------------- ### TTML2 Example Fragment - Font Size Source: https://www.w3.org/TR/ttml2/index An XML fragment illustrating the application of tts:fontSize within TTML2, showing style definitions and content with inline font size adjustments. ```xml
Then fill up the glasses
with treacle and ink,
Or anything else
that is pleasant to drink.
It seems a paradox, does it not,
the image formed on
the Retina should be inverted?
It is puzzling, why is it
we do not see things upside-down?
You have never heard the Theory,
then, that the Brain also is inverted?
No indeed! What a beautiful fact!
But how is it proved?
Thus: what we call
the vertex of the Brain
is really its base
and what we call its base
is really its vertex,