Python Turtle Font: Change Font, Size and Style (+ Fonts List)

To change the font in Python Turtle, pass a font tuple to write(): pen.write("Hello", font=("Arial", 24, "bold")). The tuple holds the font family, the size and the style. This guide shows every part of that tuple with a screenshot, how to list the fonts you can use on your computer, and how to align, measure, and style text in a Turtle window.

Every program was run with Python 3.12.5 (Tk 8.6) on Windows 11; the screenshots are the real Turtle windows. For the full reference, see turtle.write() in the Python documentation.

Quick answer: change the font of Turtle text

import turtle

screen = turtle.Screen()
screen.setup(600, 340)

pen = turtle.Turtle()
pen.hideturtle()
pen.penup()
pen.goto(0, -20)
pen.write("Hello, Turtle!", align="center", font=("Arial", 36, "bold"))

turtle.done()
Python Turtle font example: write() showing Hello, Turtle! in 36 point bold Arial in the Turtle window
The window the program opens.

Without a font argument, write() uses ('Arial', 8, 'normal'), which is very small. The full signature is write(arg, move=False, align="left", font=("Arial", 8, "normal")); the Turtle write() function guide covers the other arguments in detail.

The font tuple: family, size and style

Python Turtle font tuple explained: font family Arial, size 24 in points and style bold italic
The three parts of the font tuple.
  • Family: the name of any font installed on the computer, such as "Arial" or "Times New Roman". The name must match exactly, including spaces.
  • Size: an integer. Positive numbers are points; negative numbers are pixels (see below).
  • Style: "normal", "bold", "italic", "underline", "overstrike", or several of them in one string.

You can leave out parts from the end: font=("Arial", 24) and even font=("Arial",) work, and the missing parts use Tk’s defaults.

Turtle font styles: bold, italic, underline

Put one style or several, separated by spaces, in the third position of the tuple:

import turtle

screen = turtle.Screen()
screen.setup(560, 420)
screen.title("Turtle font styles")

pen = turtle.Turtle(visible=False)
pen.penup()

styles = ["normal", "bold", "italic", "underline", "overstrike", "bold italic underline"]

y = 140
for style in styles:
    pen.goto(-240, y)
    pen.write(f'"{style}"', font=("Arial", 22, style))
    y -= 55

turtle.done()
Python Turtle font styles: normal, bold, italic, underline, overstrike and bold italic underline text
All six style strings in the same window.

Turtle font size

The size is the second item of the tuple. This program writes the same text at six sizes:

import turtle

screen = turtle.Screen()
screen.setup(620, 440)
screen.title("Turtle font sizes")

pen = turtle.Turtle(visible=False)
pen.penup()

y = 180
for size in [8, 12, 16, 24, 32, 48]:
    y -= int(size * 2.1)            # leave room for the taller text
    pen.goto(-280, y)
    pen.write(f"Size {size}", font=("Arial", size, "normal"))

turtle.done()
Python Turtle font size comparison from 8 to 48 points written with Arial
Font sizes 8 to 48.

Points or pixels?

A positive size is measured in points, so the text gets bigger on screens with display scaling. A negative size is measured in pixels, which keeps the text the same size everywhere. You can compare them with tkinter.font, which Turtle uses under the hood:

import tkinter as tk
from tkinter import font

root = tk.Tk()
root.withdraw()

points = font.Font(family="Arial", size=24)      # positive = points
pixels = font.Font(family="Arial", size=-24)     # negative = pixels
print("size=24  line height:", points.metrics("linespace"), "px")
print("size=-24 line height:", pixels.metrics("linespace"), "px")
print("screen scaling:", round(root.tk.call("tk", "scaling"), 2), "pixels per point")

root.destroy()

Output:

size=24  line height: 36 px
size=-24 line height: 27 px
screen scaling: 1.33 pixels per point

Tk converts points to pixels using the screen resolution (1.33 pixels per point on a standard 96 DPI screen, as above), so size 24 is taller than size -24. Use positive sizes in most programs, and negative sizes when text has to fit an exact number of pixels, such as inside a box you drew.

Python Turtle fonts list: which fonts can you use?

Turtle can use any font installed on the computer that runs the program. There is no fixed Turtle font list, so the best way to see your options is to ask Tk for the installed font families:

import tkinter as tk
from tkinter import font

root = tk.Tk()
root.withdraw()                      # no empty window needed

# skip Windows' "@" names (vertical versions of Asian fonts)
families = sorted(f for f in set(font.families()) if not f.startswith("@"))
print(len(families), "font families installed")
print(families[:6])

root.destroy()

Output:

371 font families installed
['8514oem', 'Agency FB', 'Algerian', 'Arabic Transparent', 'Arial', 'Arial Baltic']

This Windows 11 computer has 371 font families. The list is different on every computer, so check a font before you rely on it:

import tkinter as tk
from tkinter import font

root = tk.Tk()
root.withdraw()

installed = set(font.families())
for name in ["Arial", "Georgia", "Comic Sans MS", "Roboto", "Helvetica"]:
    print(f"{name:14} {'installed' if name in installed else 'not installed'}")

root.destroy()

Output:

Arial          installed
Georgia        installed
Comic Sans MS  installed
Roboto         installed
Helvetica      not installed

Here are twelve fonts that come with Windows, written by Turtle. Arial, Courier New, Georgia, Tahoma, Times New Roman and Verdana also come with macOS; Linux usually has different fonts, such as DejaVu Sans and Liberation Serif:

import turtle

fonts = ["Arial", "Calibri", "Cambria", "Comic Sans MS", "Consolas", "Courier New",
         "Georgia", "Impact", "Segoe UI", "Tahoma", "Times New Roman", "Verdana"]

screen = turtle.Screen()
screen.setup(640, 640)
screen.title("Python Turtle fonts")

pen = turtle.Turtle(visible=False)
pen.penup()

y = 250
for name in fonts:
    pen.goto(-290, y)
    pen.write(f"{name}: The quick brown fox", font=(name, 18, "normal"))
    y -= 46

turtle.done()
Python Turtle fonts list chart: Arial, Calibri, Cambria, Comic Sans MS, Consolas, Courier New, Georgia, Impact, Segoe UI, Tahoma, Times New Roman and Verdana
Twelve Windows fonts written with turtle.write().

What happens if the font is not installed?

Turtle does not raise an error. Tk quietly replaces a missing font with a default one, so your text still appears, just in the wrong font. You can see which font is really used with actual("family"):

import tkinter as tk
from tkinter import font

root = tk.Tk()
root.withdraw()

for name in ["Arial", "Helvetica", "Times", "Courier", "No Such Font"]:
    used = font.Font(family=name, size=12).actual("family")
    print(f"{name!r:15} -> {used}")

root.destroy()

Output:

'Arial'         -> Arial
'Helvetica'     -> Arial
'Times'         -> Times New Roman
'Courier'       -> Courier New
'No Such Font'  -> Arial

Helvetica, Times and Courier are special: Tk guarantees them on every platform and maps them to a similar installed font. Use them when your program has to look the same on Windows, macOS and Linux. To use a font from a .ttf file, install it on the computer first; Turtle cannot load font files directly.

Align Turtle text left, center or right

align decides which part of the text sits at the turtle’s position. The red dots show the turtle’s position for each line:

import turtle

screen = turtle.Screen()
screen.setup(560, 340)
screen.title("Text alignment")

pen = turtle.Turtle(visible=False)
pen.speed(0)

# vertical guide at x = 0
pen.penup(); pen.goto(0, 140); pen.pendown()
pen.color("#bbbbbb"); pen.goto(0, -140); pen.penup()

pen.color("black")
for y, align in [(70, "left"), (0, "center"), (-70, "right")]:
    pen.goto(0, y)
    pen.dot(10, "red")                      # where the turtle is
    pen.write(f"align='{align}'", align=align, font=("Arial", 22, "bold"))

turtle.done()
Python Turtle text alignment: align left, center and right relative to the turtle position marked with red dots
left starts at the turtle, center is centred on it, right ends at it.

Note that the turtle’s y position is the bottom of the text, not the middle.

Mix fonts on one line with move=True

With move=True the turtle moves to the end of the text it just wrote, so the next write() continues on the same line. That lets you change font, style and colour in the middle of a sentence:

import turtle

screen = turtle.Screen()
screen.setup(640, 340)
screen.title("write(move=True)")

pen = turtle.Turtle(visible=False)
pen.penup()
pen.goto(-280, -15)

parts = [("Python ", "#306998", "bold"),
         ("Turtle ", "#2e7d32", "italic"),
         ("fonts", "#c62828", "bold underline")]

for text, color, style in parts:
    pen.color(color)
    pen.write(text, move=True, font=("Arial", 32, style))   # turtle moves to the end

turtle.done()
Python Turtle write with move=True mixing bold, italic and underlined fonts and three colours on one line
Three write() calls, one line of text.

The text colour is the turtle’s pen colour, set with pen.color(). See Python Turtle colors for all the ways to choose a colour.

Text effects: shadow and outline

Turtle has no built-in text effects, but writing the same text more than once gives you a drop shadow or an outline:

import turtle

screen = turtle.Screen()
screen.setup(600, 340)
screen.bgcolor("#fdf6e3")
screen.title("Text effects")

pen = turtle.Turtle(visible=False)
pen.penup()
FONT = ("Arial Black", 40, "normal")

def shadow_text(text, x, y, color, shadow="#b0b0b0", offset=4):
    pen.goto(x + offset, y - offset)
    pen.color(shadow)
    pen.write(text, align="center", font=FONT)
    pen.goto(x, y)
    pen.color(color)
    pen.write(text, align="center", font=FONT)

def outline_text(text, x, y, color, outline="black", width=2):
    pen.color(outline)
    for dx in (-width, 0, width):
        for dy in (-width, 0, width):
            pen.goto(x + dx, y + dy)
            pen.write(text, align="center", font=FONT)
    pen.goto(x, y)
    pen.color(color)
    pen.write(text, align="center", font=FONT)

shadow_text("Shadow", 0, 40, "#306998")
outline_text("Outline", 0, -80, "#ffd43b")

turtle.done()
Python Turtle text effects: blue text with a grey drop shadow and yellow text with a black outline
A shadow is one extra copy; an outline is eight.

Measure text to draw a box around it

To fit a box or button around text, measure it with tkinter.font.Font: measure() gives the width and metrics("linespace") the height, both in pixels, which are the same units as Turtle coordinates on a default screen:

import turtle
from tkinter import font as tkfont

screen = turtle.Screen()
screen.setup(560, 340)
screen.title("Text in a box")

pen = turtle.Turtle(visible=False)
pen.speed(0)

text = "GAME OVER"
FONT = ("Georgia", 32, "bold")

# measure the text in pixels
f = tkfont.Font(family=FONT[0], size=FONT[1], weight="bold")
width = f.measure(text)
height = f.metrics("linespace")
pad = 16

# write() puts the bottom of the text at the turtle's y
x, y = 0, -height / 2
pen.penup()
pen.goto(x - width / 2 - pad, y - pad)
pen.pendown()
pen.pensize(3)
pen.color("#c62828", "#ffebee")
pen.begin_fill()
for side in (width + 2 * pad, height + 2 * pad) * 2:
    pen.forward(side)
    pen.left(90)
pen.end_fill()

pen.penup()
pen.goto(x, y)
pen.write(text, align="center", font=FONT)

turtle.done()
Python Turtle text in a box: GAME OVER in Georgia bold with a red border sized using tkinter font measure
The box is sized from the measured text.

Practical example: a game scoreboard

Games often need text that changes. Use a separate hidden turtle for the text and call clear() before writing the new value, otherwise the numbers are drawn on top of each other (more in Python clear turtle):

import turtle

screen = turtle.Screen()
screen.setup(520, 340)
screen.bgcolor("black")
screen.title("Scoreboard")

board = turtle.Turtle(visible=False)
board.penup()
board.color("white")

def show_score(left, right):
    board.clear()                          # remove the old score
    board.goto(0, 0)
    board.write(f"{left} : {right}", align="center", font=("Courier New", 56, "bold"))
    board.goto(0, -50)
    board.write("Player A      Player B", align="center", font=("Arial", 14, "normal"))

show_score(0, 0)
show_score(3, 2)                           # later in the game

turtle.done()
Python Turtle scoreboard with a large Courier New bold score 3 : 2 on a black background
The score after show_score(3, 2).

Troubleshooting Turtle fonts

  • The text is tiny: you did not pass font, so the default size 8 is used.
  • The font looks like Arial even though you chose another one: the name is misspelled or the font is not installed. Check it with the font.families() program above.
  • The text is cut off at the window edge: with align="left" the text starts at the turtle, so move the turtle left or use align="center".
  • Old text stays on the screen: call clear() on the turtle that wrote it before writing again.
  • font.families() raises RuntimeError: Too early to use font: no default root window: create tk.Tk() (or turtle.Screen()) first, as in the examples.

Frequently asked questions

How do I change the font in Python Turtle?

Pass a font tuple to write(): pen.write("Hello", font=("Arial", 24, "bold")). The tuple is (family, size, style).

How do I get a list of fonts for Python Turtle?

Turtle can use any installed font. Print them with tkinter.font.families() after creating a Tk window or a Turtle screen. The list depends on the computer.

What is the default font of turtle.write()?

("Arial", 8, "normal"), which is why text looks very small until you pass your own font.

How do I make Turtle text bold or italic?

Use the third item of the tuple: "bold", "italic", or both as "bold italic". "underline" and "overstrike" also work.

Why doesn’t my Turtle font change?

If the font name is misspelled or not installed, Tk silently uses a default font. Check the exact name in tkinter.font.families(), or use Helvetica, Times or Courier, which work on every platform.

Keep learning Python Turtle: