Text keeps its filters next to its styled runs. In HTML export, static text in several colours with filters is one item of pieces (pp), so the pieces share one filtered group as evaluate draws them; the page's player draws such items piece by piece.
11 KiB
Text
Titles, captions, speech bubbles, scores and name boxes: this chapter covers the Text tool, the fonts it uses, the three kinds of text, and how text looks when you export.
A note on keys: AniCraft uses Ctrl on Windows and Linux and ⌘ (Command) on macOS, and Alt is ⌥ (Option) on macOS. So Ctrl+B is ⌘B on a Mac.
Typing text
- Pick the Text tool (T).
- Click on the stage where the text should start, and type. Enter starts a new line.
- Press Esc, or click somewhere else, to finish.
To change text later, click it with the Text tool, or double-click it with the Selection tool (V). Each edit is one undo step.
Text is artwork like any other: you can move, scale, rotate and fade it, tween it, put it in a symbol, and use it as a mask.
Text properties
Select some text to set its look in Properties. With the Text tool in your hand and nothing selected, the same rows set what new text gets. New text keeps the last style you used, as in Animate.
| Row | What it sets |
|---|---|
| Font | The typeface: any font on your computer. |
| Size | The size in pixels, with the text colour beside it. |
| Style | B for bold and I for italic, then Left, Centre or Right alignment. |
| Spacing | Letters (letter spacing) and Lines (line spacing), in pixels. |
| Width | Turn on Wrap to wrap lines at a fixed width, and set the width. With Wrap off, each paragraph stays on one line. |
| Position | Normal, Superscript or Subscript, then U for underline. |
| Link | A web address the characters link to in SVG exports. |
| Indent | How far the first line of a paragraph starts in (negative hangs it out). |
| Margins | Space kept clear at the left and right of each line, in pixels. |
Bold and italic use the matching face of the font (for example, its Bold or Italic file). If a font has no bold or italic face, AniCraft doesn't fake one.
With the text selected (not being typed in), a change applies to the whole block. Where the characters differ, the row shows the first one's value and says mixed.
Styling words and characters
One block can mix styles, as in Animate:
- Click into the text with the Text tool (or double-click it).
- Select the characters: drag across them, or hold Shift with the arrow keys.
- Set their style in Properties: the section at the top is named after your selection, for example Text: 6 characters selected. Font, size, colour, bold, italic, letter spacing, superscript and subscript, underline and link all apply to just those characters, and the stage shows the change at once (each change is one undo step).
Things to know:
- Typing continues the style before the caret. Type after a red word and the new letters are red. To start a new style, set it in Properties with nothing selected, then type.
- Paragraph settings (alignment, indent, margins and line spacing) apply to every paragraph your selection touches. Press Enter inside a paragraph and both halves keep its settings.
- Copy and paste keeps the styles inside AniCraft. Text pasted from other apps comes in plain, in the style of the text before it.
- While you type, the box over the stage shows the colours, sizes, italics, underlines and superscripts in AniCraft's interface font; the stage shows the real fonts and alignment.
- Superscript and subscript use the size and offset the font itself suggests.
- Text set by a script in a dynamic or input field uses the field's first style.
Fonts on your computer
The Font menu lists the fonts installed on your computer, plus Inter, which comes with AniCraft. There is nothing to set up: install a font in your system as usual and it shows up the next time AniCraft starts.
Your text looks the same everywhere
AniCraft saves the shapes of the letters with the document. So a file you send to someone looks exactly the same on their computer, even if they don't have the font, and so do your exports.
If you edit text whose font isn't on this computer, AniCraft lays it out again with the default font and tells you, so nothing changes behind your back.
Missing characters
If a font doesn't have a character you type (an emoji, or a letter from another script), the character shows as an empty box. AniCraft doesn't borrow it from another font yet, so pick a font that covers your language.
Static, dynamic and input text
As in Animate, text comes in three types. Choose one in Properties › Text type.
| Type | What it's for |
|---|---|
| Static text | Text that's part of the artwork: titles, captions, labels. This is what the Text tool makes. |
| Dynamic text | Text a script changes while the movie plays, such as a score or a timer. |
| Input text | A box viewers type into, such as a name or an answer. |
Field settings
Dynamic and input text are fields, with a few more rows in Properties:
- Instance: the name scripts use for the field, for example
score_txt. Letters, digits and_only. - Lines: Single line, Multiline, Multiline no wrap, or (input text only) Password, which hides what the viewer types.
- Box: the field's width (W) and height (H) in pixels.
- Show border: draws a line round the field and fills its box.
- Selectable (dynamic text): viewers can select the text while the movie plays.
- Max characters (input text): the most characters a viewer may type. 0 means no limit.
Setting and reading fields from a script
A frame script can set a dynamic field's text, add to it, and read what a viewer typed into an input field. For example:
score_txt.text = "Score: " + score;
See Interactivity for how to add scripts.
Trying it out
Choose Control › Test Movie (Ctrl+Enter). Click an input field and type. You can move the caret with the arrow keys, Home and End, select with Shift or the pointer, delete with Backspace and Delete, start a new line with Enter in a multiline field, and press Tab to go to the next field. Select All, Copy, Paste and your system's input methods work too. Screen readers find input fields as text boxes.
Not there yet for fields: formatted (HTML) text, different styles inside one field, scripts that change a field's colour or format, listening for each change as the viewer types, Cut, double-clicking to select a word, a blinking caret and scrolling a field with the mouse wheel.
Text on a path
Static text can follow the outline of a shape: an arc, a circle, a wave.
- Select the text block.
- In Properties, under Path, click Attach to Path.
- Click the shape on the stage. (Press Esc to give up.)
The text now runs along a copy of the shape's outline, standing on it. The shape itself stays as it was: delete or hide it if you only want the text. With a shape and the text both selected, Modify › Text › Attach Text to Path does the same in one go.
- Offset moves the text along the path. The text's alignment says how: left-aligned text starts at the offset, centred text is centred on it, right-aligned text ends at it.
- Flip runs the text the other way along the path, on its other side (under an arc instead of over it).
- Release turns it back into a line of text where it started.
Changing the words, font, size or spacing keeps the text on its path. On a closed shape the text wraps round; on an open one, letters that would run past the ends don't show. The selected text shows the path it follows. Text on a path is always static text, and it is drawn from its own outlines like all text, so it looks the same on every computer.
Filters on text
Text takes the same filters as movie clips and buttons: Drop Shadow, Blur, Glow, Bevel, Gradient Glow, Gradient Bevel and Adjust Color. Select the text and choose Add filter under Filters in Properties; you don't need to make a symbol first. Everything in Filters and blend modes works here too: the order, the eye that switches a filter off, copying and pasting filters, and presets, the built-in ones included.
Filters work on static, dynamic and input text. On a field, the box, the border and the text are filtered together, so a drop shadow falls from the whole field. Changing the words, the font or the text type keeps the filters. They tween between keyframes and in the Motion Editor like a movie clip's (see Tweens). Modify › Break Apart turns the text into a shape, which has no filters.
Turning text into shapes
To reshape the letters themselves, select the text and choose Modify › Break Apart (Ctrl+B). The text becomes an ordinary shape that you can edit with the Subselection tool, recolour and morph. Text in several colours becomes one shape per colour. It is no longer editable as text, so keep a copy if you might want to change the words.
Text in exports
Because the letter shapes are saved with the document, text comes out exactly as you see it on the stage in every picture export: PNG, PNG sequences, GIF, animated PNG and WebP, video, sprite sheets, SVG and Lottie. Fields show their authored text, box and border there. Each colour in a block is drawn in its colour, and in SVG, characters with a link are a link.
In the HTML canvas export, the movie plays in a web browser:
- static text, and the authored text of fields, is drawn exactly as in AniCraft;
- input fields become real text boxes over the movie, so the browser's input methods, on-screen keyboards on phones and tablets, and the clipboard all work. Filters on an input field show on its box and border there; what the viewer types is drawn by the browser, without them (the export report says so);
- text that a script or the viewer changes is drawn with the fonts in the viewer's browser. If the viewer doesn't have your font, it uses a similar one, and the export report tells you this can happen.
AniCraft doesn't embed font files in the web page. Most font licences don't allow that, and AniCraft can't check the licence for you. This only affects text that changes while the movie plays.
See Exporting and Publish for every format.
Text in Animate files
When you open an Animate document, its text comes across as text you can edit, with its font, size, colour, bold and italic, superscript and subscript, links, alignment, indents, margins, spacing, position and wrapping. Each Animate text block stays one block, with every run's style kept, and its filters. Dynamic and input fields come across as fields, with their names, boxes, borders and line types. Fonts that aren't on your computer use the default font, and the status bar names them. See Opening Animate files.
Not there yet: vertical text and text along a path.
Next steps
- Make text react to the viewer: Interactivity.
- Animate a title: Tweens.