Preparing search index...

    Class FontFamily

    Groups multiple Font assets into a single family, mapping each to a style (weight + italic).

    Hierarchy (View Summary)

    Index

    Properties

    bold: Font

    The Font asset assigned to the Bold (weight 700) style slot.

    boldItalic: Font

    The Font asset assigned to the Bold Italic (weight 700, italic) style slot.

    entries: FontFamilyEntry[]

    The full list of font entries in this family. Setting this property replaces all entries.

    extraBold: Font

    The Font asset assigned to the ExtraBold (weight 800) style slot.

    extraBoldItalic: Font

    The Font asset assigned to the ExtraBold Italic (weight 800, italic) style slot.

    extraLight: Font

    The Font asset assigned to the ExtraLight (weight 200) style slot.

    extraLightItalic: Font

    The Font asset assigned to the ExtraLight Italic (weight 200, italic) style slot.

    familyName: string
    heavy: Font

    The Font asset assigned to the Heavy (weight 900) style slot.

    heavyItalic: Font

    The Font asset assigned to the Heavy Italic (weight 900, italic) style slot.

    light: Font

    The Font asset assigned to the Light (weight 300) style slot.

    lightItalic: Font

    The Font asset assigned to the Light Italic (weight 300, italic) style slot.

    medium: Font

    The Font asset assigned to the Medium (weight 500) style slot.

    mediumItalic: Font

    The Font asset assigned to the Medium Italic (weight 500, italic) style slot.

    name: string

    The name of the Asset in Lens Studio.

    regular: Font

    The Font asset assigned to the Regular (weight 400) style slot.

    regularItalic: Font

    The Font asset assigned to the Regular Italic (weight 400, italic) style slot.

    semiBold: Font

    The Font asset assigned to the SemiBold (weight 600) style slot.

    semiBoldItalic: Font

    The Font asset assigned to the SemiBold Italic (weight 600, italic) style slot.

    thin: Font

    The Font asset assigned to the Thin (weight 100) style slot.

    thinItalic: Font

    The Font asset assigned to the Thin Italic (weight 100, italic) style slot.

    uniqueIdentifier: string

    Methods

    • Creates a new, empty FontFamily asset.

      Returns FontFamily

      //@input Asset.Font fontRegular
      //@input Asset.Font fontBold
      //@input Asset.Font fontItalic

      var family = FontFamily.create();
      family.familyName = "MyFamily";
      family.regular = script.fontRegular;
      family.bold = script.fontBold;

      // Alternatively, populate via the entries property:
      var regular = FontFamilyEntry.create();
      regular.font = script.fontRegular;
      regular.weight = 400;

      var bold = FontFamilyEntry.create();
      bold.font = script.fontBold;
      bold.weight = 700;

      var italic = FontFamilyEntry.create();
      italic.font = script.fontItalic;
      italic.weight = 400;
      italic.italic = true;

      family.entries = [regular, bold, italic];
    • Returns the name of this object's type.

      Returns string

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean