Closed caption styling options

You can specify several caption styling options, and these options override the style options in the original captions.

new TextFormat( 
   font,  
   fontColor,  
   edgeColor,  
   fontEdge,  
   backgroundColor,  
   fillColor,  
   size,  
   fontOpacity,  
   backgroundOpacity,  
   fillOpacity, 
   bottomInset, 
   safeArea) 
TIP

In options that define default values (for example, DEFAULT), that value refers to what the setting was when the caption was originally specified.

Format Description
Font

The font type.

Can be set only to a value that is defined by the TextFormat.Font enumeration and represents, for example, monospaced with or without serifs.

Tip: The actual fonts that are available on a device might vary, and substitutions are used when necessary. Monospace with serifs is typically used as a substitute, although this substitution can be system specific.

Size

The caption's size.

Can be set only to a value defined by the TextFormat.Size enumeration:

  • MEDIUM - The standard size
  • LARGE - Approximately 30% larger than medium
  • SMALL - Approximately 30% smaller than medium
  • DEFAULT - The default size for the caption; the same as medium

Font color

The font color.

Can be set only to a value defined by the TextFormat.Color enumeration.

Background color

The background character cell color.

Can be set only to values that are available for the font color.

Font opacity

The opacity of the text.

Expressed as a percentage from 0 (fully transparent) to 100 (fully opaque). DEFAULT_OPACITY for the font is 100.

Bottom inset

Vertical distance from the bottom of the caption window for captions to avoid.

Expressed as a percentage of the caption window height (for example, "20%") or a number of pixels (for example, "20").

Safe area

A region around the edge of the screen between 0% to 25% where captions will not appear.

By default, the safe area for 608/708 is 12% and the safe area for WebVTT is 0%. This setting allows your application to override that default. If two values are provided, for example, the string "10%,20%", the first value is the horizontal safe area and the second value is the vertical safe area. If one value is provided, for example, the string "15%", both the vertical and horizontal axes use the specified safe area.

On this page

Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now