textSize()

Set size of text

This function sets or gets the current font size. This size will be used in all subsequent calls to the text() function.

textSize(number)
InputDescriptionDefault

number

The size of the text in pixels

10

Examples

    textSize(10)
    text("ABCD", 15, 25)

    textSize(20)
    text("ABCD", 15, 50)

    textSize(30)
    text("ABCD", 15, 75)

Find these documents helpful? Let the people who made them help your child learn to code at Strivemath!

We'd love to hear your Feedback/Comments here.

Last updated