q5play
    Preparing search index...

    Function textWeight

    • 📘 Sets the text weight.

      • 100: thin
      • 200: extra-light
      • 300: light
      • 400: normal/regular
      • 500: medium
      • 600: semi-bold
      • 700: bold
      • 800: bolder/extra-bold
      • 900: black/heavy

      Parameters

      • weight: string | number

        font weight

      Returns void

      await Canvas(200);
      background(0.8);
      textSize(32);
      textAlign(CENTER, CENTER);

      textWeight(100);
      text('Hello, world!', 0, 0);