This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: write tilted text in turtle
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Joe.Metcalfe, ammar2, belopolsky, gregorlingl, lanyjie, serhiy.storchaka, terry.reedy, willingc
Priority: normal Keywords:

Created on 2010-11-25 16:36 by lanyjie, last changed 2022-04-11 14:57 by admin.

Messages (6)
msg122379 - (view) Author: Yingjie (lanyjie) Date: 2010-11-25 16:36
First of all, I'd like to express my deep gratidute to the author of this module, it is such a fun module to work with and to teach python as a first programming language.

Secondly, I would like to request a feature if it is not too hard to achieve. Currently, you can only write texts horizontally, no matter what is the current orientation of the turtle pen. I wonder if it is possible to write text in any direction when we control the heading of the turtle? For example, the following code would write a vertically oriented text:

>>> setheading(90) #turtle facing up
>>> write("vertical text!")

Thanks a lot!

Yingjie
msg122533 - (view) Author: Joe Metcalfe (Joe.Metcalfe) Date: 2010-11-27 16:09
Turtle is built on top of Tk, which is currently at version 8.5 - this has no ability to rotate text. When Tk version 8.6 arrives it should be able to write rotated text (see http://mail.python.org/pipermail/tkinter-discuss/2010-November/002490.html) and turtle.py could be updated to take advantage of it.
msg227863 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-09-29 23:30
Could this now be implemented in the turtle module?
msg319750 - (view) Author: Carol Willing (willingc) * (Python committer) Date: 2018-06-16 15:17
This would be a fun feature to add. The next step on this issue would be to determine if this can be accomplished with Tk 8.6.
msg319768 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-06-16 18:15
c.create_text(100, 100, angle=90.0, text='test text')
is a tclerror in 8.5 and works in 8.6.
msg319786 - (view) Author: Ammar Askar (ammar2) * (Python committer) Date: 2018-06-16 21:12
I don't think backwards compatibility matters too much for the turtle package but the way its proposed in the initial report makes it so that text in previous versions would now be angled to the turtle's heading.

To keep the previous behavior a keyword arg could be added but given that this package is mostly for learning and fun, that might complicate it a little.

Aside from that, the patch to add this is fairly trivial now.
History
Date User Action Args
2022-04-11 14:57:09adminsetgithub: 54740
2018-06-16 21:12:14ammar2setnosy: + ammar2
messages: + msg319786
2018-06-16 18:15:32terry.reedysetnosy: + serhiy.storchaka, - BreamoreBoy
messages: + msg319768
2018-06-16 15:17:33willingcsetnosy: + willingc

messages: + msg319750
versions: + Python 3.8, - Python 3.5
2014-09-29 23:30:32BreamoreBoysetnosy: + terry.reedy, BreamoreBoy

messages: + msg227863
versions: + Python 3.5
2010-11-27 16:10:19Joe.Metcalfesetversions: - Python 3.2
2010-11-27 16:09:42Joe.Metcalfesetnosy: + Joe.Metcalfe
messages: + msg122533
2010-11-25 20:19:55ned.deilysetnosy: + belopolsky, gregorlingl
2010-11-25 16:36:12lanyjiecreate