Discord
Login
Community
DARK THEME

Text Size

New to microStudio and wondering how to change text size. Please help.

when you draw text, this is the function:

---- SNIPPET FROM DOCS

screen.drawText( text, x, y, size, [color] ) // Color is optional

Draws text on the screen. The first parameter is the text to be displayed, then the x and y coordinates where the text will be centered, then the size (height) of the text. The last parameter is the drawing color, it can be omitted, in this case the last defined color will be reused.

Example: screen.drawText("Hello!",0,0,30, "#FFF")

---- END SNIPPET

Pretty much just adjust the SIZE parameter when you draw Text :D

There are functions to even use a different font, or discover the amount of pixels a text string!

You can find more text related functions/features under documention -> https://microstudio.dev/documentation/

You might need to check under "API reference" under "Fundamentals" and "API cheatsheet" under "Quick reference".

edited: Corrected my example code above by grabbing the original form the docs.

I thought it was screen.drawText(text,x,y,color) that's what it is for me

Color is optional... size seems to be required though. I fixed the text in my post above to make it clearer.

If color is left out, the current set drawing color is used.

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community