I'd like to flow text into a region defined by a curve, such as:

pts = {{0, 0}, {1, 1}, {2, -1}, {3, 0}, {5, 2}, {6, -1}, {7, 3}, {0, 1}, {0, 0}};

enter image description here

The text must flow so that every character appears, as shown here.

Here is an example from this page.

enter image description here

(It is unacceptable to use the contour to produce a mask and "hide" some characters outside the contour.)

I could put in new line characters by hand, but this is unacceptable as the regions are quite complex, and every time I adjust the font size I'd have to go back and alter every new line character by hand.

It is also important that the final figure be in .eps (or .pdf), so some pixel-based methods simply will not work.

  • $\begingroup$ Could you be more explicit about what flow means? $\endgroup$ – Chip Hurst Oct 19 '19 at 19:04
  • $\begingroup$ Simply fill the region with the letters in sequence order: istudiopublisher.com/help-pages/pgs/text-flow-tool.html $\endgroup$ – David G. Stork Oct 19 '19 at 19:48
  • 2
    $\begingroup$ David, on v12.0.0 on Wolfram Cloud front-end the ordering of characters is not preserved and the vertical positions of words are jittered (they are not on a straight line). Do you not get the same issue on desktop version? (thank you again for the kind words btw) $\endgroup$ – kglr Oct 19 '19 at 23:45
  • 1
    $\begingroup$ @kglr: Ah... I had just realized that word order is not preserved, so no... this doesn't quite work. I'm v. 11.3.0 on a Mac. $\endgroup$ – David G. Stork Oct 19 '19 at 23:49
  • 1
    $\begingroup$ the approaches in the q/a's How can I wrap text around a circle? and Movable text on a curve also look promising as a first step. $\endgroup$ – kglr Oct 20 '19 at 0:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.