fontStyles (setter)

Sets the list of settings for the font style of the control.

Signatures

  •    ParamateControls.<ControlName>.fontStyles

Example

 const fontStyles = [
    {
      font: 'Arial',
      size: 10,
      style: 'normal',
      offset: 10,
      fillStyle: 'black',
    },
    {
      font: 'serif',
      size: 10,
      style: 'italic',
      offset: 10,
      fillStyle: 'black',
    },
  ];
  ParamateControls.<ControlName>.fontStyles = fontStyles;
 

Remark

It is possible to style each individual control in the list if the param string is passed as a list of vectors. In this case, each key in the style object must contain the list of different styling options. The length of each list must directly correspond to the N of controls in the list.

Example

 // Give each of the 2 controls a unique style
 const fontStyles = [
   {
    font: ['serif', 'arial', 'tahoma'],
    size: [12, 14, 10],
    style: ['normal', 'normal', 'normal'],
    fillStyle: ['yellow', 'white', 'blue'],
   }
  ];
  ParamateControls.<ControlName>.fontStyles = fontStyles;