A longstanding question of Gromov asks whether every one-ended word-hyperbolic group contains a subgroup isomorphic to the fundamental group of a closed hyperbolic surface. An infinite family of word-hyperbolic groups can be obtained by taking doubles of free groups amalgamated along words that are not proper powers. We define the set of polygonal words in a free group of finite rank, and prove that polygonality of the amalgamating word guarantees that the associated square complex virtually contains a pi(1)-injective closed surface. We provide many concrete examples of classes of polygonal words. For instance, in the case when the rank is 2, we establish polygonality of words without an isolated generator, and also of almost all simple height-1 words, including the Baumslag-Solitar relator a(p) (a(q))(b) for pq not equal 0.