Search code examples
pythonturtle-graphicspython-turtle

How can I find out which fonts are available in Turtle?


I'm working with python's turtle module and want to load different fonts. I've read that turtle uses tkinter's fonts but some of these fonts that should be available are in fact not. Does anyone know how I can add fonts or get a list of available ones? I would especially like to write arabic, hebrew fonts.


Solution

  • Try this to list fonts.

    import tkinter as tk
    r = tk.Tk()
    print(list(tk.font.families()))
    

    Turtle is based on tkinter, so you list the tkinter fonts.