User Guide
529
Example
The following code shows that build number of the RealPlayer installed on the system is
6.0.9.357:
put realPlayerVersion()
-- "6.0.9.357"
recordFont
Syntax
recordFont(whichCastMember, font {[,face]} {,[bitmapSizes]} {,characterSubset} {,
userFontName})
Description
Command; embeds a TrueType or Type 1 font as a cast member. Once embedded, these fonts are
available to the author just like other fonts installed in the system.
You must create an empty font cast member with the
new() command before using recordFont.
• font—Name of original font to be recorded.
• face—List of symbols indicating the face of the original font; possible values are #plain, #bold,
#italic
. If you do not provide a value for this argument, #plain is used.
• bitmapSizes—List of integers specifying the sizes for which bitmaps are to be recorded. This
argument can be empty. If you omit this argument, no bitmaps are generated. These bitmaps
typically look better at smaller point sizes (below 14 points) but take up more memory.
• characterSubset—String of characters to be encoded. Only the specified characters will be
available in the font. If this argument is, all characters are encoded. If only certain characters
are encoded but an unencoded character is used, that character is displayed as an empty box.
• userFontName— A string to use as the name of the newly recorded font cast member.
The command creates a Shock Font in
whichCastMember using the font named in the font
argument. The value returned from the command reports whether the operation was successful.
Zero indicates success.
Examples
This statement creates a simple Shock Font using only the two arguments for the cast member
and the font to record:
myNewFontMember = new(#font)
recordFont(myNewFontMember, "Lunar Lander")
This statement specifies the bitmap sizes to be generated and the characters for which the font
data should be created:
myNewFontMember = new(#font)
recordfont(mynewmember,"lunar lander", [], [14, 18, 45], "Lunar Lander Game High \
Score First Last Name")
Note: Since recordFont resynthesizes the font data rather than using it directly, there are no legal restrictions on
Shock Font distribution.
See also
new()