Articles
2D Objects
2D Text

2D Text

You can add 2D text to effects in Spark AR Studio - including adding your own custom fonts.

Text in Spark AR Studio won't be translated into other languages.

Review policies for 2D text

There are specific approval policies for 2D text. It's worth taking a look at these before submitting an effect that includes 2D text, to make sure it's accepted first time.

Review policies for text

If your effect includes text that's not integrated into the scene, it won't be accepted. See our policy on visual text, for more information.

This is because simply placing text on the screen tends to cover up and interfere with the AR experience instead of appearing naturally in the scene. Remember that people often prefer to add their own text and stickers to effects when they share them in their Instagram or Facebook stories. The only type of static text we accept is a timestamp or a few numbers on a film strip that don’t block the experience for users.

If you need to include text that’s not a timestamp, use a face tracker or plane tracker to track the text to the face or moving object.

For example, if you want to use a score counter in your gaming effect, track it to the user’s head using a face tracker, as in the example below.

For an example of how to integrate text into an effect, learn how to create a 2D photo effect with a dynamic timestamp.

Adding text

To add text to your effect:

  1. Click Add Object.
  2. Select 2D Text.

Text will automatically be added as a child of a canvas.

To change what the text says:

  1. Go to Text in the Inspector.
  2. Add the text you want to show in your effect in the box next to Text.

Positioning text

In the Inspector, use:

  • Alignment - to align text in a particular position within the canvas.
  • Flexibility - to make text scale up or down with the device screen, so it's always in proportion.
  • Pinning - to position text against one of the sides of the canvas, or in the center. It will always maintain this position, even if the canvas scales up or down.

Find out more about positioning 2D objects and text in this tutorial.

Fonts and colors

Use the Font and Color options in the Inspector to change the font and choose colors for your text. You can also add custom fonts.

Dynamic text

Add dynamic text to personalize an effect - for example, to show the time, date or location.

2D Text - properties

To make changes to text, adjusts its properties in the Inspector.

You can also edit rotation, scale and position in the Viewport.

Layer

Choose which layer the text is assigned to, or create a new one.

Visible

Uncheck this box to stop the text object from being rendered in the scene.

Width and Height

Adjust the width and height of the text.

You can also adjust these values to fill the width and height of the parent canvas. To do this:

  • Click the Width text field, and select Fill Width, to fill the width of the parent canvas.
  • Click Height text field and select Fill Height, to fill the height of the parent canvas.

Width and Height can either be set to Fixed or Relative:

  • Fixed lets you to set a specific number for the size of the text. It will not scale with the size of the parent object.
  • Relative lets you to set a percentage number that will scale with the width and height of the parent object.

Pinning

Pinning a text object will mean it maintains the same distance to its parent's border, however much you transform the parent.

Text can be pinned to the top, bottom, left and right.

Alignment

Alignment moves the text object around within the parent object. Text objects can be aligned to the top, center, bottom, left and right.

Typography

Text

Enter the text you want to add.

Editable Text

Check this box to allow people using your effect to customize the text. When checked, you can add a placeholder using the placeholder field indicating that the text is editable. Find out more.

Dynamic Text

Insert a token into the Text box to show personalized text using mobile device data, like current city or the day of the week. Find out more about adding dynamic text.

Font

Select from a wide variety of pre-installed fonts, including ones with typographical emphasis, such as bold or italics. Or, add your own.

Font Size

Change the size of the font you're using.

Color

Select a color for your text.

H Alignment

Choose from left, center or right horizontal alignment for your text.

V Alignment

Choose from top, middle or bottom vertical alignment for your text.

Line Spacing

Adjust the space between lines of text.

Letter Spacing

Adjust spacing between letters.

Max Lines

Set the largest number of lines you'll allow for this text object.

Position

Alter the position of the text in your scene. There's no Z position because text is a 2D object.

Material

Create a material for your text.

Enable for

When the boxes are checked next to Front Camera and Back Camera the text will be visible through both the front and back camera on a device.

When the boxes are checked next to Preview and Capture the text will be visible both before the person using your effect is capturing a video and during capture.

Interactions

Insert simple combinations of patches into the Patch Editor, like tap gestures.

Was this article helpful?