Preparing search index...

    Class FontCollectionEntry

    Represents a single entry in a FontCollection. Each entry holds an asset reference (either a Font or FontFamily) along with a weight and italic flag that determine the style the entry maps to. For FontFamily entries, weight and italic are ignored.

    Index

    Properties

    Methods

    Properties

    asset: Font | FontFamily

    The Font or FontFamily asset for this entry.

    italic: boolean

    Whether this entry maps to an italic style. Ignored for FontFamily entries.

    weight: number

    The font weight this entry maps to (e.g. 400 for Regular, 700 for Bold). Ignored for FontFamily entries.

    Methods

    • Creates a new FontCollectionEntry with default values.

      Returns FontCollectionEntry

      //@input Asset.Font fontBold
      //@input Asset.FontFamily myFamily

      // Font entry — weight and italic determine the style it maps to
      var fontEntry = FontCollectionEntry.create();
      fontEntry.asset = script.fontBold;
      fontEntry.weight = 700;

      // FontFamily entry — weight and italic are ignored
      var familyEntry = FontCollectionEntry.create();
      familyEntry.asset = script.myFamily;