Skip to main content

Text & Fonts

2D and 3D text, fonts, text styling, and localization.

Commonly used

Guides

All APIs in this topic

Add components to a scene object and reference assets and other modules with a script input.

Components, assets, and modules

APIDescription
FontA font asset used for rendering text.
FontCollectionAn ordered collection of Font and FontFamily assets, allowing a Text component to access multiple fonts and font families.
FontFamilyGroups multiple Font assets into a single family, mapping each to a style (weight + italic).
LocalizationsAssetAsset that provides the necessary localized text for your Lens.
TextRenders 2D text with specific style and layout.
Text3DRenders 3D text with specific style, layout and material.

Objects and data

APIDescription
BackgroundSettingsSettings for rendering the background on a Text component.
CursorPositionThe position of a text cursor for a given character index, returned by Text.getCursorPositions and Text3D.getCursorPositions.
CustomVariationStyleA user-defined named style on a variable Font.
DropshadowSettingsUsed in Text's dropShadowSettings property.
FontCollectionEntryRepresents a single entry in a FontCollection.
FontFamilyEntryRepresents a single entry in a FontFamily, mapping a Font asset to a style (weight + italic).
LocalizationSystemHelps convert data types to localized string representations.
NamedInstanceInfoRead-only named axis preset from the font's fvar table, for example "Condensed Bold".
OutlineSettingsUsed in Text's outlineSettings property.
TextFillFill settings used by several text related classes.
TextProviderControls a text rendering texture.
VariationAxisInfoRead-only metadata describing one OpenType variation axis on a variable font.

Enums

APIDescription
CapitalizationOverrideChanges the capitalization of the text component.
FontStyles
HorizontalAlignmentUsed by the horizontalAlignment property in MeshVisual.
HorizontalOverflowOptions for wrapping text horizontally.
Text3DExtrudeDirectionControls the direction in which Text3D meshes are extruded relative to the component's local position.
TextFillModeUsed in TextFill's mode property.
TileZoneDefines the bounding area used for texture tiling with TextFill's tileZone property.
VerticalAlignmentUsed by the verticalAlignment property in MeshVisual.
VerticalOverflowOptions for handling vertical text overflow.