With RealText, you can create timed text presentations that can stream alone or in combination with other media such as audio or video. This makes RealText a handy means for adding text to SMIL presentations. Using RealText, you can add subtitles to a video, for example, or provide closed-captioning. This chapter explains the RealText markup. Appendix E provides a reference for RealText tags and attributes.
Using any text editor, you can create a RealText clip in a text file that uses the
file extension .rt
. The file includes the text you want to display, as well as the
RealText markup that describes how to display and time the text. Like a
RealVideo or Flash clip, a RealText clip has a height and width, as well as an
intrinsic duration, from a few seconds to several hours. The following are
some of the features that RealText provides:
The RealText markup lets you create text in many different fonts, sizes, and colors.
RealText timing commands control when each paragraph, sentence, word, or letter appears. You might display a new sentence every few seconds, as in a video subtitle. Or you could make letters appear one at a time as if they were being typed across the screen.
Within a RealText clip, words can scroll up the screen or from side to side. This lets you create a window of smoothly flowing text. You can even make text loop, creating an endlessly flowing marquee.
With the optional positioning commands, you can control exactly where each word appears within the RealText window.
![]() |
View it now!
(requirements for viewing this sample)
Play this sample to view an example of RealText. |
RealText supports a number of languages, including English, Chinese, Korean, Japanese (Kanji), and many European languages. It can stream text in any language that can be written in one of its supported character sets, which are listed in the section "Specifying the Character Set". Each character set supports at least one font, as described in "Setting the Font".
![]() |
Note: Character set and font support is built into RealText. Therefore, RealText does not necessarily support all character sets and fonts supported by various Web browsers. |
In addition to RealText, RealOne Player can play plain text clips (.txt
) and
inline text, which is text written directly into a SMIL file. When you use plain
text or inline text, all the text displays at once, and you cannot position text
blocks at different parts of the screen, or apply styles such as bolding only to
certain words. However, plain text and inline text support a wider range of
fonts and character sets than RealText, and are well-suited to static text
display. You can use inline text to label media clips, for example, or create
interactive "buttons" through SMIL commands.
![]() |
For More Information: To use plain text or inline text, refer to "Adding Text to a SMIL Presentation". |
A RealText clip is a text file that uses the file extension .rt. At the top of the file
you write a <window>
tag that can include several attributes that set overall
parameters, such as the window type, width, height, and duration. The file
ends with a </window>
tag. Between these tags, you add the text that you want
to display in RealOne Player, using RealText tags and attributes to lay out and
time the text. The following example is a simple RealText file that displays a
new line of text every three seconds:
<window height="250" width="300" duration="15" bgcolor="yellow"> |
The RealText markup is similar to SMIL, and follows the same basic rules described in "Creating a SMIL File". The following are the main points in mind when writing a RealText file:
<ul>
tag has the end tag </ul>
), closes with a forward slash, as in a <br/>
tag, for example..rt
. Do not include spaces in the file name. For example, you can have the file
my_realtext.rt but not the file
my realtext.rt.<!-- This is a comment --> |
Because a RealText clip is a simple text file, it consumes minimal bandwidth and streams quickly to RealOne Player. RealText presentations are therefore easily accessible to viewers with slow network connections. When combining RealText with other clips, you need to ensure that RealText has approximately 1 Kbps of available bandwidth.
![]() |
Tip: If you have a large RealText file, you can compress it with GZIP when delivering the clip from many Web servers. For more information, see "GZIP Encoding for Large Text Files". |
![]() |
For More Information: For more on bandwidth allocation, see "Step 4: Develop a Bandwidth Strategy". |
You can easily combine RealText with any other clip through a SMIL file. Chapter 8 explains the basics of SMIL. The section "Playing Clips in Parallel" explains how to display RealText along with other clips. You'll also need to understand SMIL layouts as described in Chapter 12. The section "RealText Window Size and SMIL Region Size" explains various ways to coordinate the RealText window size to its SMIL region size.
![]() |
Tip: To see examples of RealText displayed with other clips, get the zipped HTML version of this guide as described in "How to Download This Guide to Your Computer", and view the Sample Files page. |
RealText does not have to be created in a static file. A broadcast application can capture live text, add RealText markup to it, and send it to Helix Universal Server. A sample broadcast application is included with the Software Development Kit (SDK), available for download at this Web page:
http://proforma.real.com/rnforms/resources/server/realsystemsdk/ind ex.html
The <window>
and </window>
tags that begin and end a RealText file,
respectively, set presentation attributes such as the window's height and width
Here is an example of a <window>
tag:
<window type="marquee" duration="2:05:00.0" underline_hyperlinks="false"> |
You specify attributes in the form attribute="value"
within the <window>
tag,
much as you specify HTML table attributes within the HTML <TABLE>
tag. No
attributes are required for the <window>
tag, however. If you do not specify an
attribute, the attribute's default value applies. The following table
summarizes the <window>
tag attributes.
Attribute | Value | Function | Reference |
---|---|---|---|
bgcolor |
name |# RRGGBB| transparent |
Sets the window color. | click here |
crawlrate |
pixels_per _second |
Sets the horizontal text speed. | click here |
duration |
hh:mm:ss.xy |
Specifies presentation length. | click here |
extraspaces |
use |ignore |
Recognizes or ignores extra spaces in text. | click here |
height |
pixel |
Sets the window pixel height. | click here |
link |
name |# RRGGBB |
Specifies the hyperlink color. | click here |
loop |
false|true |
Turns text looping on or off. | click here |
scrollrate |
pixels_per _second |
Sets the vertical text speed. | click here |
type |
generic|tickertape| |
Sets the window type. | click here |
underline_hyperlinks |
false|true |
Determines whether hyperlinks are underlined. | click here |
version |
1.0|1.2|1.4|1.5 |
Specifies RealText version. Required for some character sets. | click here |
width |
pixels |
Sets the window pixel width. | click here |
wordwrap |
false|true |
Turns word wrap on or off. | click here |
The <window>
tag's type="
window type
"
attribute sets specific properties for the
RealText clip:
<window type="scrollingnews" ...> |
Choose a window type depending on how you want to display text. Each
window type has preset default values that make it easier to create certain
types of text displays. You can create any type of RealText clip using just the
default window type of generic
, however. The following are the RealText
window types. Click the link to see an example of each of these window types
in RealOne Player:
generic
This is the default window type. You can use the generic window type to create any type of RealText clip based on the other attributes you include in the <window>
tag.
scrollingnews
A scrollingnews window scrolls text upward at a specified rate for the entire presentation. The text initially appears at the top of the window.
teleprompter
A teleprompter window fills the display area with text starting at the top of the screen. As more timed text displays, the new text appears at the bottom of the screen and pushes older text up. The text does not scroll smoothly as in a scrollingnews window, though.
marquee
In a marquee window, text crawls from right to left and can loop. Text is centered vertically within the window.
tickertape
A tickertape windiw is like a marquee window, but text displays at the window's top or bottom edge, rather than in the center.
Each window type sets a number of default values for the RealText clip. The
following table lists the attribute default values that differ based on the choice
of window type. Keep in mind that you can change any default value for any
window type through the <window>
tag. If you want a marquee
window to be
320 pixels wide instead of 500 pixels, for example, you add width="320"
to the
<window>
tag to override the window type's default width value.
Value | generic | scrollingnews | teleprompter | marquee | tickertape |
---|---|---|---|---|---|
width in pixels (click here) | 320 |
320 |
320 |
500 |
500 |
height in pixels (click here) | 180 |
180 |
180 |
30 |
30 |
background (click here) | white |
white |
white |
white |
black |
horizontal crawl rate in pixels per second (click here) |
0 |
0 |
0 |
20 |
20 |
vertical scroll rate in pixels per second (click here) |
0 |
10 |
0 |
0 |
0 |
text looping (click here) | no |
no |
no |
yes |
yes |
The width
and height
attributes determine the RealText window's width and
height in pixels, respectively. The bgcolor
attribute determines the window's
background color. "Specifying RealText Color Values" explains RealText color
values. Here is an example that sets a window size and color:
<window width="400" height="225" bgcolor="blue"...> |
![]() |
For More Information: Default values for size and background color are listed in the table "Default Values for RealText Window Types". |
Using the rn:backgroundOpacity
attribute in SMIL, you can turn the RealText
window's background color fully transparent or semi-transparent, which is
useful when overlaying a video with RealText subtitles. Within the RealText
file, you define an opaque color, such as black or white, as the value of the
<window>
tag's bgcolor
attribute. In your SMIL file, you then specify a
percentage value for rn:backgroundOpacity
.
![]() |
For More Information:
For more information about
rn:backgroundOpacity , see "Creating Transparency in a Clip's
Background Color". For an example of using SMIL to display
different RealText subtitles based on viewer language
preferences, see "Subtitles and HTML Pages in Different
Languages".
|
![]() |
View it now!
(requirements for viewing this sample)
This sample displays RealText subtitles with a semi-transparent background over a video clip. |
When you add RealText to a SMIL presentation, you display your RealText clip
in a SMIL region. For best results, create a SMIL region that is the same height
and width as the RealText clip. Displaying a RealText clip in a SMIL region
that is larger or smaller than the clip may enlarge or shrink the text,
depending on how you set the <region>
tag's fit
attribute. The sections below
explain which fit
values are best to use.
Note that enlarging or shrinking a RealText clip through SMIL does not affect
line breaks. Line breaks are determined by the RealText window's width, font,
and font size. You could place a RealText window that is 200 pixels wide in a
SMIL region that is 150 pixels wide, for example, and scale the clip's width
down by adding fit= "fill"
to the SMIL <region>
tag. This simply makes all the
text smaller. It does not cause lines to break at different places within the text.
![]() |
For More Information:
SMIL regions are described in "Playback
Regions". The section "Fitting Clips to Regions" explains the
<region> tag's fit attribute. RealText word wrapping is
described in "Wrapping Text to New Lines".
|
When the SMIL region is larger than the RealText clip, the default value
fit="hidden"
is recommended for the <region>
tag. This keeps the RealText clip
as its specified size. You can then use a registration point, as described in
"Positioning Clips in Regions", to position the clip within the region. The
registration point might center the clip in the region, for example.
If you want to scale the RealText clip larger, using fit="meet"
in the <region>
tag
typically gives the best results because it preserves the clip's aspect ratio. This
scales the text larger but maintains the relative letter spacing. You can use
fit="fill"
to make the RealText clip the same size as the region, but distortion
in letter spacing may make the clip unreadable if the region has a markedly
different width-to-height ratio than the clip.
![]() |
View it now!
(requirements for viewing this sample)
In this sample, you can view the same RealText clip displayed in four larger SMIL regions that have different fit attributes.
|
When the SMIL region is smaller than the RealText clip, the default value
fit="hidden"
in the <region>
tag may prevent some text from displaying. The
value fit="meet"
is generally the best choice, because it scales the clip smaller to
fit completely inside the region while preserving the relative letter spacing.
When displaying RealText in a smaller region, though, you need to be careful
to keep the text from scaling down to an unreadable size.
![]() |
View it now!
(requirements for viewing this sample)
This sample lets you view the same RealText clip displayed in four smaller SMIL regions that have different fit attributes.
|
The duration
attribute specifies how long the RealText clip plays. The default is
60 seconds. RealText uses only the "normal play time" timing values of
hh:mm:ss.xy
, which are described in "Using the Normal Play Time Format". In
this timing method, only the ss
field is required. For example, the following
duration
attributes make the clip last 90 seconds:
<window duration="90" ...> |
<window duration="5:30" ...> |
and 1 hour, 33 minutes, and 15 seconds:
<window duration="1:33:15" ...> |
When you put RealText in a SMIL presentation, SMIL timing values can
override the duration defined in the RealText clip. Suppose a RealText clip
named marquee.rt
has a duration of three minutes:
<window duration="3:00.0" ...> |
If you put this clip into a SMIL presentation with the following SMIL clip
source tag, the dur="2min"
attribute tells RealOne Player to stop playing this
clip after two minutes regardless of the clip's internal timeline:
<textstream src="rtsp://helixserver.example.com/marquee.rt dur="2min" .../> |
If the SMIL duration is longer than the RealText duration, a fill
attribute can
specify how RealOne Player treats the clip once it has stopped playing:
<textstream src="rtsp://helixserver.example.com/marquee.rt dur="4min" |
![]() |
For More Information:
For more on the SMIL fill attribute, see
"Setting a Fill".
|
duration
, whereas in SMIL it must be dur
.hh:mm:ss.xy
) for setting time values. It cannot use SMIL timing shorthand values such as "3min"
.5:00.0
and the RealOne Player position slider takes five minutes to travel from left to right.<clear/>
tag, or the text moves out of the window because you have set a scrollrate
or a crawlrate
.![]() |
For More Information: See "Clearing Text from the Window" and "Setting a Scroll Rate or a Crawl Rate". |
The <window>
tag can include a version number, as shown in this example:
<window version=" |
You typically do not have to specify a version number when using RealText in
English. Properly displaying languages other than English may require that
you specify a version number explicitly in the <window>
tag, however. This
chapter tells you when a version number is required to use a specific feature.
The following paragraphs summarize the features that require you to add
version numbers:
version="1.2"
This RealText version provides support for the mac-roman
character set, and changes the default character set from us-ascii
to iso-8859-1
. This version requires RealPlayer 7 or later, so RealPlayer G2 will autoupdate to the latest version of RealOne Player before playing the clip.
version="1.4"
This RealText version provides support for the iso-2022-kr
character set and the Korean language. This version requires RealPlayer 7 or later, so RealPlayer G2 will autoupdate to the latest version of RealOne Player before playing the clip.
version="1.5"
This RealText version supports hyperlinks in the format protocol:path
, as explained in "Issuing RealOne Player Commands". This version requires RealPlayer 8 or later, so RealPlayer G2 and RealPlayer 7 will autoupdate to the latest version of RealOne Player before playing the clip.
![]() |
Tip: Because newer versions of RealText encompass all features from previous versions, you can always specify a higher version than that required for a feature. If a feature requires RealText version 1.2, for example, you can use 1.5 as the version number. |
The underline_hyperlinks="false|true"
attribute determines whether hyperlinks
are underlined. The default is true. The link="
color
"
attribute, which defaults to
blue
, sets the color of hyperlinks within the text. Here is an example:
<window underline_hyperlinks="false" link="red" ...> |
![]() |
For More Information: See "Specifying RealText Color Values" for color options. |
As described in the following sections, several <window>
tag attributes
(scrollrate
, crawlrate
, wordwrap
, loop
, and extraspaces
) affect how text displays in
the RealText clip.
The scrollrate
attribute sets the number of pixels per second that the text
scrolls from the bottom of the window to the top for the duration of the clip.
It has no effect on tickertape and marquee windows. Here is an example:
<window scrollrate="25" ...> |
The crawlrate
attribute specifies the number of pixels per second that the text
moves horizontally from right to left for the duration of the clip. Here is an
example:
<window crawlrate="40" ...> |
![]() |
Tip:
A RealText clip should not use both scrollrate and
crawlrate . For best results, use a scrollrate or a crawlrate under
30 . The best values are 25 , 20 , 10 , 8 , 5 , 4 , 2 , and 1 . For rates faster
than 30 , use multiples of 20 or 25 , such as 40 , 50 , 60 , 75 , 80 , and
so on.
|
![]() |
For More Information:
The table "Default Values for RealText
Window Types" lists the default values for scrollrate and
crawlrate in the standard window types.
|
The wordwrap="false|true"
attribute, which defaults to true
, specifies whether
word wrap is performed. When word wrap is on, text lines longer than the
specified window width wrap to the following line. If it is off, long lines are
truncated by the window border. This attribute has no effect for windows that
have horizontal text motion, such as a marquee window.
The loop="false|true"
attribute is available only in tickertape and marquee
windows, which have horizontal "crawling" motion. In these window types,
the loop
attribute defaults to true
, which tells RealOne Player to redisplay
("loop") text under these circumstances:
<time begin="...">
tags to set begin times on text blocks, looping occurs if all text has moved out of the window but the clip's duration has not expired. If the duration is two minutes but all text has moved out the window after one minute, for example, the text begins again.<time begin="...">
tags to set begin times, text blocks loop if they have scrolled out of the window and the next text block's begin time has not elapsed. For example, consider this markup:
|
In this case, the first text block loops as necessary for one minute. At that time, the <clear/>
tag erases the window and the <br/>
tag starts the second text block at the window's right-hand side.
![]() |
For More Information:
For information on timing and erasing
text, see "Timing and Positioning Text". The <br/> tag is
described in "Adding Space Between Text Blocks".
|
When set to its default value of use
, the extraspaces="use|ignore"
attribute
makes RealText recognize all blank spaces between text chunks and markup
tags. If three spaces occur between two words in the RealText file, for example,
RealOne Player displays all three spaces. It treats each carriage return and tab
as a space.
If you specify extraspaces="ignore"
, RealOne Player treats spaces, tabs, line
feeds, and carriage returns as does a Web browser, except when they are
between the <pre>...</pre>
tags. When spaces or carriage returns occur
contiguously in the text, RealOne Player interprets them as a single space, no
matter how many of them are present. So in this case, three contiguous spaces
display as one space in RealOne Player.
![]() |
For More Information:
The <pre>...</pre> tags are described in
the section "Preformatting Text"
|
The following sections explain the RealText tags you can use between the
<window>
and </window>
tags to control when and where text appears within
the RealText window. The following table summarizes the RealText timing
and positioning tags.
Tag | Attributes | Function | Reference |
---|---|---|---|
<clear/> |
(none) | Clears all text. | click here |
<pos/> |
x=" pixels "|y=" pixels " |
Positions text. | click here |
<required>... |
(none) | Ensures that text is delivered. | click here |
<time/> |
begin=" hh:mm:ss.xy "| hh:mm:ss.xy " |
Sets time when text appears or disappears. | click here |
<tl>...</tl> |
color=" name |# RRGGBB " |
Puts text at bottom of ticker. | click here |
<tu>...</tu> |
color=" name |# RRGGBB " |
Places text at top of ticker. | click here |
The <time/>
tag controls the RealText presentation timeline by specifying
when text blocks appear or disappear. The <time/>
tag is useful primarily in
RealText clips in which text does not scroll or crawl across the screen. In these
clips, RealOne Player displays all text as quickly as it can if you do not time the
text with <time/>
tag.
The <time/>
tag can have two attributes, begin
and end
. You can use one or
both attributes in each <time/>
tag. Each attribute specifies a time when the
text appears or disappears, respectively. As with the <window>
tag's duration
attribute, a <time/>
tag specifies a time in the "normal play time" format:
<time begin=" |
In the following sample text block, the first phrase appears at the start of the RealText presentation. The subsequent text blocks appear at three seconds into the timeline, and six seconds into the timeline, respectively:
Mary had a little lamb, |
![]() |
For More Information:
See "Using the Normal Play Time
Format" for more on <begin> tag timing values.
|
Text with an end time is erased when the specified end value is reached.
Otherwise it stays active until the presentation ends or the entire window is
erased with <clear/>
. In the following example, text blocks begin at different
times, but all end at the same time. Note that just as with a begin time, an end
time must appear before the text block in the file:
<time end="25"/><time begin="5"/>This text starts to display at 5 seconds. |
You can also combine the begin
and end
attributes in a single <time/>
tag as
shown here:
<time begin="23" end="55.5"/>This text displays 23 seconds into the presentation and disappears at 55.5 seconds. |
It's important to note that text following a <time/>
tag has the specified begin
or end
value until a new value is given. Therefore, once you specify an end time
for a text block, you must specify an end time for all following blocks. For
example, the following text would not display properly:
<time begin="23" end="55.5"/>Display at 23 seconds in. |
Because the second line in the preceding example does not include an end
time, the previous end time of 55.5
still applies. The second line cannot be
displayed, however, because its begin time is later than its end time.
<time/>
tags are not necessary in a window with a scrollrate
or crawlrate
unless you want to delay text, have it become visible after it has moved into the window, or have it disappear before it moves out of the window. See also "Looping Text" for information on how <time/>
tags can affect text looping.<window duration="30" ...> |
<clear/>
tag, as described below.The <clear/>
tag removes all text from the window. The text that follows this
tag then displays at the window's normal starting point, which is typically the
window's top or right edge, unless you position the text elsewhere. You can
add <clear/>
after <time begin="..."/>
to erase text before displaying new text.
This is often an easier method of removing text than using <time end="..."/>
tags. In the following example, each new line erases the preceding line:
<time begin="5"/>This line displays at 5 seconds. |
A <clear/>
tag removes all preceding text, even text that has an end time that
has not yet elapsed. In the following example, the second line of text is set to
end at 20 seconds. However, the <clear/>
tag appears at 15 seconds into the
presentation and clears this line, eliminating the end time for all following
text:
<time begin="5"/>They all lived happily. |
![]() |
Note:
The <clear/> tag does not reset text appearance. For
example, if text appears bolded before the <clear/> tag, it
remains bolded after the <clear/> tag.
|
These <pos/>
tag can position text anywhere in the RealText window. You can
use its x
attribute for horizontal positioning, and its y
attribute for vertical
positioning. Each attribute takes a value in pixels, as shown in these examples:
<pos x="10"/> |
A <pos y="
pixels
"/>
tag moves the upper, left corner of the subsequent text
block the specified number of pixels down from the window's top edge. A <pos
x="
pixels
"/>
tag indents the text block the specified number of pixels in
addition to the two-pixel default padding that applies to all text blocks. You
can combine both tags in a single tag like this:
<pos x="10" y="25"/> |
![]() |
Note:
These tags work only if scrollrate and crawlrate are both 0
(zero). For more on these attributes, see "Setting a Scroll Rate
or a Crawl Rate".
|
Th <tu>...</tu>
and <tl>...</tl>
tag sets function only with tickertape windows.
They display the enclosed text at the window's upper (<tu>...</tu>
) or lower
(<tu>...</tu>
) edge. Optionally, they can include a color
attribute that specifies
the color for the text, as shown in this example:
<tu color="blue">... |
When a tag specifies a color with the color
attribute, the color applies to text
enclosed by all subsequent tags of that type until another tag of that type
changes the color. However, color specified for <tu>
elements does not affect
color for <tl>
elements, and vice versa. The default color for <tu>
elements is
white, the default for <tl>
elements is green.
![]() |
For More Information: Refer to "Specifying RealText Color Values" for information about choosing colors. |
Use the <required>
and </required>
tags to enclose text that must be delivered
to RealOne Player under any circumstance. During extremely adverse network
conditions, Helix Universal Server will halt the presentation if necessary rather
than drop the text. You can use these tags sparingly, though, because Helix
Universal Server normally ensures that very little data loss occurs in
transmission.
![]() |
Note: Although Helix Universal Server provides reliable streaming, packets not marked as required may be lost occasionally. If a block of text does not get through, RealOne Player displays a red ellipsis (...) to indicate missing text. |
The RealText <font>
tag controls the text font and color. Because it also
specifies the character set, it determines which languages you can write in. As
shown in the following example, the <font>
tag can take multiple attributes,
and it always uses an end tag:
<font size="+2" face="Courier New" color="red"> |
Multiple <font>
tags can also be nested to turn various font features on and
off:
<font |
The following table summarizes the RealText <font>
tag attributes.
Attribute | Value | Function | Reference |
---|---|---|---|
bgcolor |
name |# RRGGBB |
Sets a background color. | click here |
charset |
us-ascii|iso-8859-1| |
Specifies character set used to display text. | click here |
color |
name |# RRGGBB |
Controls font color. | click here |
face |
(see font tables) | Sets the text face. | click here |
size |
-2|-1|+0|+1|+2|+3|+4 or 1|2|3|4|5|6|7 |
Sets the font size. | click here |
With the <font>
tag's charset
attribute, you can control the character set used
to display the text. You do not need to specify the character set explicitly to
write text in English. However, you may need to specify the character set to
write text in other supported languages. You can set the character set as well as
the font face immediately after the <window>
tag within a RealText file, as
shown in the following example:
|
You can also use multiple <font>
tags to change character sets within a
RealText file and display text in different languages:
|
It is important to note that RealText always uses its specified character set, not
the default character set of the computer playing the clip. In RealText version
1.2 and higher, the default character set is iso-8859-1
. To display Korean text
on a machine that uses the iso-2022-kr
character set by default, for instance,
you must explicitly set charset=
"iso-2022-kr" in the RealText <window>
tag. If
you do not, RealText will use its default iso-8859-1
character set, even though
iso-2022-kr
is the machine's default.
![]() |
Note: If the computer does not recognize the character set specified in the RealText clip, it displays the text in its default character set. The result is typically unreadable. |
![]() |
For More Information:
As noted in the following sections, using
some character sets requires you to include a version number
in the <window> tag. For more on version numbers, see
"Adding a Version Number".
|
The us-ascii
character set is the default character set used with most RealText
fonts when no version number is specified in the <window>
tag.
The iso-8859-1
character set is identical to us-ascii
, but includes support for
accented characters (upper 128 characters) used in many European languages.
This is the default character set used when you specify version="1.2"
or higher
in the <window>
tag. Use it when writing accented European languages on a
Windows or Unix computer. You can represent the following languages with
the iso-8859-1
character set:
Afrikaans | Basque | Catalan | Danish | Dutch | English |
Faeroese | Finnish | French | Galician | German | Icelandic |
Irish | Italian | Norwegian | Portuguese | Spanish | Swedish |
![]() |
Note:
The ISO-8859 standard specifies several additional
character sets, such as iso-8859-2 and iso-8859-3 . RealText
supports only iso-8859-1 , however, meaning that Cyrillic,
Arabic, Greek, Hebrew, and several Eastern European
languages are not supported in RealText.
|
Use the mac-roman
character set when writing in an accented European
language on a Macintosh computer. Using this character set ensures that
marks such as umlauts (for example, "ü") display properly when the RealText
clip plays on a Windows or Unix computer. Use version="1.2"
or higher in the
<window>
tag to handle this character set correctly.
![]() |
Note:
You do not need to use the mac-roman character set when
writing in English. When writing in accented languages on a
Windows or Unix machine, use the iso-8859-1 character set
instead.
|
The x-sjis
character set is for Kanji and the Osaka font. Use version="1.2"
or
higher in the <window>
tag to handle this character set correctly.
The gb2312
character set is for Simplified Chinese.
The big5
character set is for Traditional Chinese.
The iso-2022-kr
character set is for Korean. Use version="1.4"
or higher in the
<window>
tag to handle Korean text correctly.
This <font>
tag attribute face="
font name
"
controls the font use. You can use
any number of fonts in the same RealText clip. When switching fonts, be sure
to turn off the preceding font with a </font>
tag, as shown in this example:
|
Font faces correspond to character sets as described in the section "Specifying the Character Set". For non-Western fonts, you must specify the correct character set for the font to display properly. If you specify no font, RealText uses the Times New Roman or Times font regardless of the character set specified.
When writing in English or European languages, use a font name from the
"Windows Font Name" column of the following table, which lists fonts that
use the
us-ascii
or
iso-8859-1
character set. You can also view how these fonts appear. If
the specified font isn't available on a Macintosh or Unix computer, RealText
uses a system font as indicated in the table below. For example, a RealOne
Player on a Macintosh displays text in Courier if the Algerian font is not
available. The notation "(always)" indicates cases where RealText always
defaults to a system font. For example, the Fixedsys font always displays as
Courier on a Macintosh.
![]() |
Tip: A Macintosh that has Microsoft Internet Explorer 4.0 or later installed should have most of the Windows fonts. |
RealText also supports the following fonts that use character sets other than
us-ascii
and iso-8859-1
.
Font Name | Characters | RealText Font Face Tag | charset |
---|---|---|---|
AppleGothic | Korean | <font face="AppleGothic"> |
iso-2022-kr |
Batang | Korean | <font face="Batang"> |
iso-2022-kr |
BatangChe | Korean | <font face="BatangChe"> |
iso-2022-kr |
Gothic | Korean | <font face="Gothic"> |
iso-2022-kr |
Gulim | Korean | <font face="Gulim"> |
iso-2022-kr |
GulimChe | Korean | <font face="GulimChe"> |
iso-2022-kr |
Osaka | Kanji | <font face="Osaka"> |
x-sjis |
Seoul | Korean | <font face="Seoul"> |
iso-2022-kr |
![]() |
Simplified Chinese | <font face="'ËÎÌå"> (The face name displays as gibberish without the gb2312 character set.) |
gb2312 |
![]() |
Traditional Chinese | <font face="²Ó©úÅé"> (The face name displays as gibberish without the big5 character set.) |
big5 |
![]() |
Note: Korean and Japanese are supported in RealOne Player for Windows and Macintosh, but not for Unix. |
The <font>
tag attribute size="
n
"
lets you control the font size, as shown in this
example:
<font size="+1"> |
You can use relative sizes or absolute sizes as shown in the table below. This table also lists the height in pixels for each size. The pixel sizes are for reference only. You cannot specify a pixel size directly in RealText.
Relative Size | Absolute Size | Pixel Size Reference |
---|---|---|
-2 |
1 |
12 pixels |
-1 |
2 |
14 pixels |
+0 (default) |
3 |
16 pixels |
+1 |
4 |
20 pixels |
+2 |
5 |
24 pixels |
+3 |
6 |
36 pixels |
+4 |
7 |
48 pixels |
![]() |
Note: You can also specify relative sizes smaller than -2 or larger than +4, but they are treated as -2 and +4, respectively. |
Two attributes of the <font>
tag, color
and bgcolor
, let you set the color for the
text letters, and the background against which the text appears. The section
"Setting the Window Size and Color" explains how to set the RealText
window's background color.
The color
attribute of the <font>
tag lets you control the text color. It has no
effect on tickertape windows because the <tu>
and <tl>
tags, which are
described in "Aligning Text in a Tickertape Window", set the tickertape text
colors. The following example shows the text color set to red:
<font color="red"> |
Use the bgcolor
attribute to the <font>
tag to set the text background color.
The default background color for text is "transparent"
, making the text
background the same color as the window. The following example sets the text
background to yellow:
<font bgcolor="yellow"> |
Note that the text background color is independent of the window
background color. If the window background color is blue, for example, and
the text background color is yellow, a stripe of yellow appears in front of the
blue window wherever the affected text displays. Within that yellow stripe, the
text appears in the color set by the color
attribute.
For RealText window backgrounds and fonts, you can use red/green/blue hexadecimal values (#RRGGBB), as well as the following color names, listed here with their corresponding hexadecimal values:
![]() |
Tip: Appendix C provides background on hexadecimal color values. Note, though, that RealText does not support RGB color values used with SMIL. |
For text backgrounds, you can use bgcolor="transparent"
. This is the default for
text backgrounds, meaning that the words following the tag do not have a
colored rectangle drawn behind them, so the window background color shows
around the letters. This lets you draw text over previous text (using the <pos/>
tags) without "erasing" the previous text.
The following tags let you lay out text in the RealText clip. Many of these tags
are similar to HTML tags, and are provided for compatibility. However, unlike
in HTML, RealText tags are case sensitive and a closing tag is always required.
You cannot use a <p>
tag without a </p>
tag, for example, or use capital letters
as in <P>
and </P>
. The following table summarizes the RealText layout and
appearance tags.
Tag | Function | Reference |
---|---|---|
<b>...</b> |
Bolds the enclosed text. | click here |
<br/> |
Creates a line break. | click here |
<center>...</center> |
Centers the enclosed text. | click here |
<hr/> |
Acts like two <br/> tags. |
click here |
<i>...</i> |
Italicizes the enclosed text. | click here |
<li>...</li> |
Acts like a <br/> tag. |
click here |
<ol>...</ol> |
Indents text, but does not number it. | click here |
<p>...</p> |
Creates a text paragraph. | click here |
<pre>...</pre> |
Displays text in a monospace font and preserves extra spaces. Works the same as in HTML. | click here |
<s>...</s> |
click here | |
<u>...</u> |
Underlines the enclosed text. | click here |
<ul>...</ul> |
Indents text, but does not add bullets to it. | click here |
The following tags add space between text blocks. If text flows across the screen horizontally, however, line breaks are not created.
The <p>...</p>
tags turn the enclosed text into a pargraph. In tickertape and
marquee windows, it causes the text that follows it to display at the window's
right edge. In all other window types, the <p>
and </p>
each cause the next text
block to display two lines down.
The <br/>
tag adds space between text. In tickertape and marquee windows, it
causes the text that follows it to display at the window's right edge. In all other
window types, this tag causes the text that follows to display on the next line.
The <center>...</center>
tags center the enclosed text. These tags behave the
same as HTML centering tags, but they have no effect in windows with
horizontal motion, such as tickertape and marquee windows. The <center>
tag
forces a line break if and only if a line break caused by a tag such as <br/>
, <p>
,
or <hr/>
does not immediately precede it. The </center>
tag always causes a line
break.
![]() |
Note: RealText does not center text until it has determined the line length. In rare instances, one streamed packet may contain the first part of the line while another packet received several seconds later contains the end of the line. In this case, the first part displays flush left, and the entire line is centered and redisplayed when the second packet arrives. |
The <pre>...</pre>
tags work the same as in HTML. Text tagged with <pre>
uses the Courier font at the current size. To change the font size, precede the
preformatted block with a <font size="
n
">
tag. Line breaks, spaces, and tabs are
preserved, with tabs defaulting to 64 pixels for 16 point text (the normal point
size). Tab spaces are determined by dividing the text height by 2, then
multiplying by 8.
![]() |
For More Information: For information on text heights, see the table "RealText Font Sizes". See also "Ignoring Extra Spaces". |
The following RealText tags are provided for HTML compatibility, allowing you to convert HTML to RealText more easily, and vice versa. These tags do not function the same in RealText as they do in HTML, however.
The <ol>...</ol>
tags are for compatibility with HTML lists. Text between these
tags is indented, but not numbered.
The <ul>...</ul>
tags are for compatibility with HTML lists. Text between these
tags is indented, but not bulleted.
The <li>...</li>
tags are for compatibility with HTML lists. They act like a
<br/>
tag.
The <hr/>
tag is for compatibility with HTML horizontal rules. It acts like two
<br/>
tags.
The following RealText tags let you add emphasis to text.
The <b>...</b>
tags display the enclosed text bolded.
The <i>...</i>
tags display the enclosed text italicized.
The <s>...</a>
tags strike through the enclosed text.
The <u>...</u>
tags display the enclosed text underlined.
The following sections describe tags you can use to launch URLs through RealText. You can also use tags to issue RealOne Player commands such as Pause and Play. The following table summarizes link and command syntax.
Attribute | Value | Function | Reference |
---|---|---|---|
href=" command " |
command:seek( time )| |
Issues a command. | click here |
href="command:openwindow()" |
name | URL | |
Opens new windows | click here |
href="mailto: address " |
email_address |
Opens e-mail message. | click here |
href=" URL " |
target="_player" |
Links to URL. | click here |
![]() |
Tip:
Text in a link uses the color specified in the link attribute
of the <window> tag. The link is underlined unless the <window>
tag includes underline_hyperlinks="false" .
|
![]() |
For More Information: SMIL files can also define hypertext links that may override the link you set here. For more information, see Chapter 15. |
![]() |
View it now!
(requirements for viewing this sample)
Display this scrolling RealText clip to view several hyperlinking possibilities. |
This tag turns the enclosed text into an e-mail hyperlink:
<a href="mailto:address">...</a> |
When the viewer clicks the link, RealText opens the viewer's default mail
application. Use an address in the standard form, such as name@company.com
.
In most cases, the e-mail application opens a new message with the defined
address in the "to" line.
The following RealText tag turns the text enclosed between <a href...>
and
</a>
into a hyperlink that opens an HTML page or a media clip:
<a href="URL" [target="_player"]>...</a> |
The specified URL should begin with a protocol designation such as http://
or
rtsp://
. The optional target="_player"
attribute launches the new stream in the
media playback pane. If you do not use the target attribute, or you specify
target="_browser"
, the linked URL opens in RealOne Player's media browser
pane, or in the viewer's default Web browser with earlier versions of RealPlayer.
The following example launches a new SMIL Presentation in RealOne Player, replacing the currently playing presentation:
<a href="rtsp://helixserver.example.com/video2.smil target="_player">Play Next</a> |
You can also open a link in a new media window that pops up above the media playback pane. This lets you keep navigation information visible in the media playback pane, for example, while content plays in a new window. For more about this, see "Opening a Media Playback Window with a Clip Link".
This example opens a URL in the media browser pane of RealOne Player, or in the viewer's default Web browser with earlier versions of RealPlayer:
<a href="http://realguide.real.com">Visit RealGuide</a> |
You can also specify URLs relative to the location of the RealText source file.
For example, the link <a href="more.htm">...</a>
opens the file more.htm in the
same directory as the RealText file. Relative links follow the standard HTML
directory syntax.
![]() |
Note: With RealOne Player, you cannot target the related info pane or a secondary browsing window. |
If you include version="1.5"
(or higher if using a newer version of RealText) in
the <window>
tag, you can open a URL in the form protocol:path
instead of
protocol://path
. Protocols using this format include those for Telnet and AOL
Instant Messenger. For example, here is a RealText link that launches AOL
Instant Messenger:
<window version="1.5"...> |
The following tag makes the enclosed text a hyperlink that, when clicked, executes a RealOne Player command:
<a href=" |
The commands are case-sensitive and must be enclosed in double quotes. The
target="_player"
attribute is required.
The following command instructs RealOne Player to seek to the specified time in the current text stream:
<a href="command:seek(time)" target="_player">Seek</a> |
For example, the following instructs RealOne Player to seek to 1:35.4 in the stream:
<a href="command:seek(1:35.4)" target="_player">Seek</a> |
When clicked, the following link causes RealOne Player to pause the stream:
<a href="command:pause()" target="_player">Pause</a> |
Clicking the next link causes RealOne Player to begin or resume playing the stream:
<a href="command:play()" target="_player">Resume</a> |
The following table lists the character codes you can include in a RealText
source file. Codes begin with an ampersand ("&"
) and end with a semicolon
(";"
). RealText interprets these characters the same way as popular Web
browsers.
Code | Displays as |
---|---|
< |
< |
> |
> |
& |
& |
|
(nonbreaking space) |
  to ÿ |
Characters taken from the active character set as specified by the active <font charset="..."> tag. The default character set is iso-8859-1 , which is also known as ISO Latin 1. For a list of these characters, see the W3C reference at http://www.w3.org/MarkUp/html-spec/html-spec_13.html. Or click here to generate a list. See below, however, if you're using the mac-roman character set. |
For example, the following RealText source text:
This is a bold tag: "<b>". |
is displayed in a RealText window as:
This is a bold tag: "<b>". |
Unlike HTML, RealText allows you to change character sets within a
document. It then takes coded characters from the active character set.
Generally, character codes 128 and lower are the same in all Western-language
character sets. Those higher than 128 may differ, though. In the mac-roman
character set, for example, ¦
is a paragraph symbol. But in iso-8859-1
, this
symbol is ¶
.
See http://czyborra.com/charsets/mac-roman.gif for a GIF chart of the
mac-roman
upper character set. Go by this chart, rather than the W3C reference
or JavaScript list provided above if you've set <font charset="mac-roman">
and are
entering coded characters of 
or higher. The values in the chart are in
hexadecimal (base 16). The chart cell in the upper, left-hand corner equals 128
in decimal (base 10), so you can count across from there. To make a paragraph
symbol when using mac-roman
, for instance, you use ¦
in the RealText file
because hexadecimal A6 on the chart is decimal 166.
This following sections provide examples of how to create various types of RealText clips.
The following sample RealText markup creates a generic RealText window:
<window duration="30" bgcolor="yellow"> |
When RealOne Player processes this file, it displays only the first line of the text from zero to three seconds into the stream:
Every three seconds after the first line displays, a new line appears as specified
by <time begin="
n
"/>
. At 15 seconds, <clear/>
clears the displayed text and
resets the text "cursor" to the upper-left corner of the window. When the
stream finishes, all lines of text following the last <clear/>
tag appear in the
window:
![]() |
View it now!
(requirements for viewing this sample)
Display this sample of a generic window. |
Note the following about this sample clip:
<window>
tag, word wrapping defaults to true. However, word wrapping is not necessary because <br/>
tags force line breaks.<time/>
tags need not appear after a <br/>
tag. They can appear anywhere in the text.<time end="
...
"/>
tags to make individual lines of text disappear before the <clear/>
tag cleared all the lines.The following example shows the RealText markup for a tickertape window. This is the RealText (.rt) source file:
<window type="tickertape" duration="1:00" width="500" loop="true" underline_hyperlinks="false" link="white"> |
This source file produces the following window in RealOne Player:
![]() |
View it now!
(requirements for viewing this sample)
Display this sample of a tickertape window. |
Note the following about this sample clip:
crawlrate
for a tickertape window.<b>
tag at the start bolds all following text.<a href="http://www.dowjones.com/">DJIA</a>
makes DJIA
a hyperlink that, when clicked, opens the URL http://www.dowjones.com/. DJIA
is not underlined because underline_hyperlinks="false"
is declared in the <window>
tag. It is drawn in white because link="white"
is also in the <window>
tag.loop="true"
in the <window>
tag means the text loops around and comes back in from the right side of the window as soon as the last character of the text has moved completely out of the window. It is not necessary to specify this attribute explicitly, because in tickertape windows loop="true"
is the default.<br/>
tag that comes before the first text item forces the text that follows to start just past the window's right edge. Any break or paragraph tag inside tickertape text causes the text that follows to start at the right edge. If the <br/>
tag were absent, the data would appear starting at the window's left edge.The following sample RealText markup creates a scrolling news window:
<window type="scrollingnews" width="240" height="180" scrollrate="20" |
The following figure shows the RealText window at nine seconds into the presentation:
![]() |
View it now!
(requirements for viewing this sample)
Display this sample of a scrolling news window. |
![]() |
Tip:
Text in a scrolling news window normally starts at the top
of the window and scrolls up. As this sample shows, you can
precede the text with <p></p> tags to push the first line of text
to the bottom of the screen.
|
The following example demonstrates a TelePrompter window. This is the RealText (.rt) source file:
<window type="teleprompter" height="64" duration="25" bgcolor="#D2F8B4" extraspaces="ignore" wordwrap="false"> |
When the window fills with text and a new line appears, all lines scroll up to make room for the new line. The following illustrates the window when the presentation ends:
![]() |
View it now!
(requirements for viewing this sample)
Display this sample of a teleprompter window. |
Note the following about TelePrompter windows:
wordwrap
attribute can be true
or false
.scrollrate
and crawlrate
attributes are ignored.<clear/>
tag to clear the window and start the next line at the window's upper, left-hand corner.<time begin/>
tags at the start of each line and do not let word wrapping cause too many line breaks between <time/>
tags.
![]() |
©2002 RealNetworks, Inc. All rights reserved.
For more information, visit RealNetworks Click here if the Table of Contents frame is not visible at the left side of your screen. |