Skip to main content

FontFamilyEntry

Class

Represents a single entry in a FontFamily, mapping a Font asset to a style (weight + italic).

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

Since Lens Scripting v356

Index

Properties

font

font: Font

The Font asset for this entry.

Since

Lens Scripting Version 356

Default Value

null

italic

italic: boolean

Whether this entry is italic.

Since

Lens Scripting Version 356

Default Value

false

weight

weight: number

The font weight (e.g. 400 for Regular, 700 for Bold).

Since

Lens Scripting Version 356

Default Value

400

Methods

create()

static create(): FontFamilyEntry

Creates a new FontFamilyEntry with default values.

Returns

FontFamilyEntry

Since

Lens Scripting Version 356

Example

//@input Asset.Font fontRegular

var entry = FontFamilyEntry.create();
entry.font = script.fontRegular;
entry.weight = 400;
entry.italic = false;

getTypeName()

static getTypeName(): TypeName<FontFamilyEntry>

Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().

Returns

TypeName<FontFamilyEntry>

Since

Lens Scripting Version 356