There seems to have been a long-standing connection in mediaeval Islamic thought between calligraphy and geometry.
The scholar Abū Ḥayyān al-Tawḥīdī (c.930–1023) wrote that ‘handwriting is spiritual geometry by means of a corporeal instrument’. Much later, Aḥmad Ibrāhīmī Ḥusaynī Qummī (b. 1546) wrote in his treatise ‘Calligraphers and Painters’ (c.1606) that ‘writing is the geometry of the soul’. Al-Tawḥīdī attributed the idea to Euclid; Qummī pointed to Plato, so both undoubtedly thought that the idea was long-standing and respected.
Calligraphy was codified by Ibn Muqla (885/6–940/1 CE), a vizier at the ʿAbbāsid court. Ibn Muqla's system can be only tentatively reconstructed from later sources, but it is plausible that he founded his reformed Arabic script on geometry.
The basis was the rhombic dot that a reed pen produced. The ʾalif [ا] was to have a height equal to a certain number of dots. Its size defined a circle, which was then used to shape the other letters. The attached images illustrate a later geometric specification.
1/2