What is the origin of curlicue?

Curlicue “an ornamental, fancy curl or twist” is a compound of the adjective curly and the noun cue. Curly, from the verb curl, appears in Middle English as crulled “curled” and is either derived from or related to Middle Dutch crul “curl,” of Germanic origin and related to the name of the rolled pastry cruller. The -ru- of crul became the -ur- of curl as the result of metathesis, a linguistic phenomenon in which sounds switch places. Metathesis is also responsible for creating third, thirteen, and thirty from Old English thridda, thrēotēne, and thrītig. The cue part of curlicue is most likely from French queue “tail,” via Old French from Latin cauda or cōda “tail,” which we discussed in the recent Word of the Day podcast about codicil. Alternatively, this cue could be in reference to the letter Q and its easily identifiable loops when written in cursive. Curlicue was first recorded in English circa 1840.