About text layers

You can add text to a composition using text layers. Text layers are useful for many purposes, including animated titles, lower thirds, credit rolls, and dynamic typography.

You can animate the properties of entire text layers or the properties of individual characters, such as color, size, and position. You animate text using text animator properties and selectors. 3D text layers can optionally contain 3D sublayers, one for each character. (See Animate text with text animators and Per-character 3D text properties.)

Text layers are synthetic layers, meaning that a text layer does not use a footage item as its source—though you can convert text information from some footage items into text layers. Text layers are also vector layers. As with shape layers and other vector layers, text layers are always continuously rasterized, so when you scale the layer or resize the text, it retains crisp, resolution-independent edges. You cannot open a text layer in its own Layer panel, but you can work with text layers in the Composition panel.

After Effects uses two kinds of text: point text and paragraph text. Point text is useful for entering a single word or a line of characters; paragraph text is useful for entering and formatting the text as one or more paragraphs.

Text layers: Vertical and horizontal point text (left), and paragraph text in a bounding box (right)
Vertical and horizontal point text (left), and paragraph text in a bounding box (right)

You can copy text from other applications such as Adobe Photoshop, Adobe Illustrator, Adobe InDesign, or any text editor, and paste it into a text layer in After Effects. Because After Effects also supports Unicode characters, you can copy and paste these characters between After Effects and any other application that also supports Unicode (which includes all Adobe applications).

Text formatting is included in the Source Text property. Use the Source Text property to animate formatting and to change the characters themselves (for example, change the letter b to the letter c).

Sequential frames in which Source Text has been animated
Sequential frames in which Source Text has been animated

Best practices for creating text and vector graphics for video

Text that looks good on your computer screen as you are creating it can sometimes look bad when viewed in a final output movie. These differences can arise from the device used to view the movie or from the compression scheme used to encode the movie. The same is true for other vector graphics, such as shapes in shape layers. In fact, the same problems can occur in raster images, but the small and sharp details of vector graphics cause the problems most often.

Keep in mind the following as you create and animate text and vector graphics for video:

  • You should always preview your movie on the same kind of device that your audience will use to view it, such as an NTSC video monitor. (See Preview on an external video monitor.)

  • Avoid sharp color transitions, especially from one highly saturated color to its complementary color. Sharp color transitions are difficult for many compression schemes—such as the compression schemes in MPEG and JPEG standards—to encode. These compression schemes can cause visual noise near sharp transitions. For analog television, the same sharp transitions can cause spikes outside the allowed range for the signal, also causing noise.

  • When text will be over moving images, make sure that the text has a contrasting border (such as a glow or a stroke) so that the text is still readable when something the same color as the fill passes behind the text.

  • Avoid thin horizontal elements, which can vanish from the frame if they happen to be on an even scan line during an odd field, or vice versa. The height of the horizontal bar in a capital H, for example, should be three pixels or greater. You can thicken horizontal elements by increasing font size, using a bold (or faux bold) style, or applying a stroke. (See Formatting characters with the Character panel.)

  • When animating text to move vertically—for scrolling credits, for example—move the text vertically at a rate in pixels per second that is an even multiple of the field rate for the interlaced video format. Such a rate of movement prevents a kind of twitter that can come from the text movement being out of phase with the scan lines. For NTSC, good values include 0, 119.88, and 239.76 pixels per second; for PAL, good values include 0, 100, and 200 pixels per second.

Note:

Apply the Autoscroll - Vertical animation preset in the Behaviors category to quickly create a vertical text crawl (for example, a credit roll).

  • To avoid the risk of twitter that comes with vertical motion, thin graphical elements, and fields, consider presenting credits as a sequence of blocks of text separated by transitions, such as opacity fades.

Fortunately, many problems with text in video and compressed movie formats can be solved with one simple technique: Apply a blur to the text layer. A slight blur can soften color transitions and cause thin horizontal elements to expand. The Reduce Interlace Flicker effect works best for the purpose of reducing twitter; it applies a vertical directional blur but doesn't blur horizontally, so it degrades the image less than other blurs.

Philip Hodgetts provides tips on the Creative COW website for getting the best results when creating text or vector graphics for video.

Scripts and expressions for working with text

This section documents scripting methods for working with text, and includes links to popular scripts and tutorials.

Create one or multiple text layers based on the contents of a text file

Christopher Green provides a script (crg_Text_from_File.jsx) on his website that allows you to create one text layer from all of the text, or you can create one layer for each line in the text file. The script also provides options for leading and other spacing.

Scripting access to text baselines

You can read the baseline (x,y) locations for a text layer using scripting with the After Effects CC 2015 (13.6) update. The new sourceText.value.baselineLocs attribute for TextDocument objects returns an array of floats indicating the starting position of each line of text’s baseline x and y value.

Line wraps in a paragraph text box are treated as multiple lines.

The array returns float values in the form of: 

line0.start_x, line0.start_y, line0.end_x, line0.end_y, line1.start_x, line1.start_y, line1.end_x, line1.end_y … lineN-1.start_x, lineN-1.start_y, lineN-1.end_x, lineN-1.end_y

Note:

If a line has no characters, the x and y values for start and end are the maximum float value (3.402823466e+38F).

Scripting improvements for text layers

You can read additional information through scripting about the font and style used in a text layer, including the location of the font file on disk.

Following are the read-only attributes for the textDocument object:

  • fontLocation: returns string with path of font file, providing its location on disk (not guaranteed to be returned for all font types; return value may be empty string for some kinds of fonts)
  • fontStyle: returns string with style information —such as bold, or italic
  • fontFamily: returns a string with the name of the font family

The value returned is for the first character in the text layer at the current time.

Edit source text of text layers

This script displays a palette for editing the text of text layers in an unstyled form. If your text layer uses a complex animation, or is difficult to access or is hidden at the current time, editing the text when not animated or style can be useful.

Download this script from Jeff Almasol's website: Redifinery.

Map text file to markers

This script maps lines from a text file as Source Text keyframes on the selected text layer at successive markers on the layer. You can control the text line to use by entering a line number as the marker’s comment.

Download this script from Jeff Almasol's website: Redifinery.

Get smart

This script displays a palette with controls for fixing various “plain text” punctuation into their “smart” typographical representations (for example, (c) is converted to the copyright symbol, ©). 

Download this script from Jeff Almasol's website: Redefinery.

Other scripts for working with text

Todd Kopriva provides an example script on the Adobe website that demonstrates the text formatting features available through the scripting interface.

Salahuddin Taha provides a script on the After Effects Scripts website that enables entry of Arabic text (which flows from right to left).

Michael Cardeiro provides a script on the After Effects Scripts website that makes multiple versions of your compositions using information from a spreadsheet or database. The script goes through your spreadsheet line by line, making a new version of your composition with text layers in the composition receiving text from the spreadsheet automatically.

The After Effects Scripts website provides many scripts for working with text. Paul Tuersley provides a script on the After Effects Scripts website that allows you to search for and edit text layers throughout your After Effects project, create your own text style presets, and apply them to multiple layers.

Paul Tuersley provides a script on the AE Enhancers forum for importing Substation Alpha (SSA) karaoke files and automatically creating animated text layers from them.

For examples of expressions for the Source Text property, see Writing expressions for source text and MarkerKey attributes (expression reference).

Enter point text

When you enter point text, each line of text is independent—the length of a line increases or decreases as you edit the text, but it doesn’t wrap to the next line.

The small line through the type tool pointer marks the position of the text baseline. For horizontal text, the baseline marks the line on which the text rests; for vertical text, the baseline marks the center axis of the characters.

When you enter point text, it is created using the properties currently set in the Character panel. You can change these properties later by selecting the text and modifying settings in the Character panel.

  1. Do one of the following to create a text layer:
    • Choose Layer > New > Text. A new text layer is created and an insertion point for the Horizontal Type tool appears in the center of the Composition panel.
    • Double-click a Type tool. A new text layer is created and an insertion point for the appropriate type tool appears in the center of the Composition panel.
    • Select the Horizontal Type tool or the Vertical Type tool , and then click in the Composition panel to set an insertion point for the text.

    Note:

    The pointer for a type tool changes depending on whether it is over a text layer in the Composition panel. When the pointer is not directly over a text layer, it appears as a new text pointer ; click to create a new text layer. Shift-click always creates a new text layer.

  2. Enter text characters by typing. Press Enter on the main keyboard (Windows) or Return (Mac OS) to begin a new line.

    Note:

    You can also choose Edit > Paste to paste text that you have copied from any application that uses Unicode characters. Text receives the formatting of the first character in the text layer into which it is pasted.

  3. To end text-editing mode, press Enter on the numeric keypad, select another tool, or press Ctrl+Enter (Windows) or Command+Return (Mac OS).

Enter paragraph text

When you enter paragraph text, the lines of text wrap to fit the dimensions of the bounding box. You can enter multiple paragraphs and apply paragraph formatting.

You can resize the bounding box at any time, which causes the text to reflow within the adjusted rectangle.

When you enter paragraph text, it has the properties set in the Character and Paragraph panels. You can change these properties later by selecting the text and modifying settings in the Character and Paragraph panels.

  1. Select the Horizontal Type tool or the Vertical Type tool .
  2. Do one of the following in the Composition panel to create a text layer:
    • Drag to define a bounding box from a corner.
    • Alt-drag (Windows) or Option-drag (Mac OS) to define a bounding box around a center point.

    Note:

    The pointer for a type tool changes depending on whether it is over a text layer in the Composition panel. When the pointer is not directly over a text layer, it appears as a new text pointer ; drag to create a new text layer. Shift-drag always creates a new text layer.

  3. Enter text by typing. Press Enter on the main keyboard (Windows) or Return (Mac OS) to begin a new paragraph. Press Shift+Enter on the main keyboard (Windows) or Shift+Return (Mac OS) to create a soft carriage return, which begins a new line without beginning a new paragraph. If you enter more text than can fit in the bounding box, the overflow icon appears on the bounding box.

    Note:

    You can also choose Edit > Paste to paste text that you have copied from any application that uses Unicode characters. Text receives the formatting of the first character in the text layer into which it is pasted.

  4. To end text-editing mode, press Enter on the numeric keypad, select another tool, or press Ctrl+Enter (Windows) or Command+Return (Mac OS).

Select and edit text in text layers

You can edit text in text layers at any time. If you set the text to follow a path, designate it as a 3D layer, transform it, or animate it, you can still continue to edit it. Before you can edit text, you must select it.

Note:

To disable the Path Options property group for a text layer, click the visibility  (eyeball) switch for the Path Options property group. Temporarily disabling the Path Options property group can make editing and formatting text easier.

The pointer for a type tool changes, depending on whether it is over a text layer in the Composition panel. When the pointer for a type tool is directly over a text layer, it appears as the edit text pointer ; click to place the insertion point in the existing text.

  • To select text with a type tool, do one of the following:
    • To select a range of text, drag over the text.
    • To select a range of text, click, move the pointer, and then Shift-click.
    • To select a word, double-click it. To select a line, triple-click it. To select a paragraph, quadruple-click it. To select all text in a layer, quintuple-click anywhere in the text.
    • To use the arrow keys to select text, hold down Shift and press the Right Arrow or Left Arrow key. To use the arrow keys to select words, hold down Shift+Ctrl (Windows) or Shift+Command (Mac OS) and press the Right Arrow or Left Arrow key.

Note:

To select all text in a text layer and activate the most recently used type tool, double-click the text layer in the Timeline panel.

Online resources for selecting and editing text in text layers

Jeff Almasol provides a script on his redefinery website for editing the source text of text layers.

Jeff Almasol provides a script on his redefinery website that converts various plain text punctuation into their “smart” typographical representations (for example, (c) is converted to the copyright symbol, ©).

Jeff Almasol provides a script on his redefinery website that sets keyframes for the Source Text property of a text layer and sets the values to text from a text file; the keyframes are placed at times specified by layer markers on the text layer.

Resize a text bounding box

  1. With a type tool active, select the text layer in the Composition panel to display the bounding box handles.
  2. Position the pointer over a handle—the pointer turns into a double arrow —and do one of the following:
    • Drag to resize in one direction.
    • Shift-drag to maintain the proportion of the bounding box.
    • Ctrl-drag (Windows) or Command-drag (Mac OS) to scale from the center.

Move a text layer

You can drag with the move pointer in the Composition panel to move a text layer. To activate the move pointer without leaving text editing mode, move the type tool away from the text in the Composition panel; when you see the move pointer , drag to move the text. You can also hold down the Ctrl (Windows) or Command (Mac OS) key to momentarily activate the move pointer.

Convert point or paragraph text

Note:

When you convert paragraph text to point text, all characters outside the bounding box are deleted. To avoid losing text, resize the bounding box so that all text is visible before conversion.

  1. Using the Selection tool , select the text layer.

    Note:

    You can’t convert the text layer if it’s in text-editing mode.

  2. Using a type tool, right-click (Windows) or Control-click (Mac OS) anywhere in the Composition panel, and choose Convert To Paragraph Text or Convert To Point Text.

    When you convert from paragraph text to point text, a carriage return is added at the end of each line of text, except the last line.

    Note:

    To display the bounding box of paragraph text and automatically select a type tool, double-click the text layer in the Timeline panel.

Change the direction of text

Horizontal text flows from left to right; multiple lines of horizontal text lie from top to bottom. Vertical text flows from top to bottom; multiple lines of text lie from right to left.

Change the direction of text
A. Horizontal point text B. Horizontal point text converted to vertical C. Horizontal paragraph text D. Horizontal paragraph text converted to vertical 
  1. Using the Selection tool , select the text layer.

    Note:

    You can’t convert text in text-editing mode.

  2. Using a type tool, right-click (Windows) or Control-click (Mac OS) anywhere in the Composition panel, and choose Horizontal or Vertical.

Convert text from Photoshop to editable text

Text layers from Photoshop retain their style and remain editable in After Effects.

If you imported the Photoshop document as merged layers, then you must first select the layer and choose Layer > Convert To Layered Comp to decompose the imported Photoshop document into its layers.

  1. Add the Photoshop text layer to your composition and select it.
  2. Choose Layer > Convert To Editable Text.

The layer becomes an After Effects text layer and no longer uses the Photoshop text layer as its source footage item.

If the layer contains layer styles, the layer styles are converted to editable layer styles as if the Layer > Layer Styles > Convert To Editable Styles command had been used on the layer before converting the text to editable text.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy