Free Online Turtle Graphics : logointerpreter.com - Surf your logo code!
Turtle Graphics - Drawing Text

[Index] [<< Previous section: Turtle Animation] [Next section: Drawing Graphic Objects >>]

label text
Description: takes a word or list as input, and strokes the input on the graphics canvas, starting at the turtle's position.
Note: The text's color is the stroking color (set it using setpencolor).
Example 1:
label "LOGO
Example 2:
right 90
setlabelheight 40
label [I love logo!]
flabel text
Description: takes a word or list as input, and fills the input on the graphics canvas, starting at the turtle's position.
Note: The text's color is the filling color (set it using setfillcolor).
Example 1:
right 90
setlabelheight 40
setfillcolor "red
flabel "LOGO
Example 2: You can use both commands when drawing a text:
right 90
setlabelheight 40
setfillcolor "red
flabel [I love logo!]
label [I love logo!]
setlabelheight size
Description: sets the font size for the text to be drawn.
Default value: 14.
Example:
right 90
setlabelheight 40
label "Logo
setlabelfont name
Description: sets the font name for the text to be drawn.
Default value: Arial.
Example:
right 90
setlabelheight 40
setfillcolor "red
label [My turtle]
rt 90 fd 50 lt 90
setlabelfont [Courier New]
label [My turtle]

[Index] [<< Previous section: Turtle Animation] [Next section: Drawing Graphic Objects >>]
  1. Turtle Graphics section's content: Go to top
Get the new 2023 ebook!
(Surf Your Logo Code! - author: Vlad TUDOR)
Online Turtle Graphics - a free and modern web-based logo interpreter
Create an account now! It's EASY and FREE. Learn Logo & Turtle Graphics!
Find us on facebook
Get social with us!
World Map
Check other turtles
around the world!
Need help?
Browse our
support topics
Logo reference
Learn about your
turtle's language