To create the head shapes, the position and rotation of each letter is defined with CSS transforms (see heads.css). To get the right values, it's mostly trial and error. But to make it a bit easier, I created a little helper script that let me drag/rotate each letter with the mouse and then copy the value to be used for those CSS transforms.