Some of my students worked on this project. They used Pharo, ROS, as well as Choregraphe to make Nao write arbitrary text. Since the robot motion is not very precise, they made up a simple but smart solution to allow the robot can push the page after writing each letter. Source code is available on GitHub.
This project was first initiated by Sophie Liuu and Joris Sittler in 2014 (first part of video below). In the first version, Nao was could write only hardwired words. This is because the whole motion was recorded in a single sequence.
In 2015, a team of two other students Pierre Milin and Timothée Scherrer, tackled this limitation. They made Nao humanoid robot write arbitrary words. Writing motions were recorded for individual letters, always starting from the same initial position. To write words, blocks for individual letters are performed in sequence. After writing a letter, the robot pushes a tray holding the paper (second part of video below).
There’s a fun fact about this project. In the first version, Nao holds the pen in its right hand. While in the second version, it holds the pen in its left hand. The only rational explanation we found is that the students of the first team were right-handed, while members of the second team were left-handed.