# [NTG-context] Text on curves

Keith McKay mckaymeister at gmail.com
Tue Apr 23 21:07:46 CEST 2019

I have been trying to typeset text onto curves and have been successful
with the help of the MetaFun manual, and the followtext command which I
saw in some correspondence between dr Hans van der Meer and Hans Hagen
on the mailing list in January this year ( the subject was Double Follow
Tokens).

The followtext command seems to used for a simple line of text and if I
increase the number of words in the line the font size is reduced to
make it fit to the length of the curve (see MWE below). I would like to
typeset complete paragraphs on the curve(s) and the only way I see of
doing this without the font size changing is to manually create each
line separately.

Is their a way where this can be done by MetaFun automatically rather
than manually? It would be really nice if I could create a number of
curves and then MetaFun typsets a paragraph of text on to them. Also,
can other options be used with followtext e.g. \input file?

I'm a complete novice with MetaFun so any advice appreciated.

Best Wishes

Keith McKay

----Minimum Working Example----

\starttext

Two different lengths of text on the same curve showing font size being
reduced.

\blank

\startMPcode

path q; q := function (1, "x", "sin(2x)" , 1, 10, .01) scaled 1.5cm ;

draw followtext(q, "some text but not that long. But here and there and
everywhere the text can become longer");

draw followtext (q shifted (0cm,-2cm), "some text but not that long. But
here and there and everywhere the text can become longer and longer and
longer finally ending here.");

\stopMPcode

Some other examples of text on a curve

\blank

\startMPcode

path p; p := reverse halfcircle xyscaled 55mm ;

draw followtext(p, "some text but not that long");

\stopMPcode

nice spiral shape with text

\startMPcode

z0 = (0,0); z1 = (60,40);

z2 = (40,90); z3 = (10,70);

z4 = (30,50);

path p; p = (z0..z1..z2..z3..z4) ;

draw followtext(p scaled 1mm, "some text but not that long. But here and
there and everywhere the text can become longer");

\stopMPcode

\stoptext

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20190423/e26a4a33/attachment-0001.html>