| Hi Michael,
nice MAPline trick. However it should be rather safe to use a T1 Font by font.T1font(<t1file instance>, <afmfile instance>). In the future we'll likely provide an official "text-without-TeX" feature. For the moment (to use the correct PyX Logo) I added some textpath functionality to the texrunner.text return value. See changeset 3230.
Best,
André
Am 11.10.2011 um 11:12 schrieb Michael J Gruber:
> ---
> Here's one for the gallery ;)
> 
> There may be better ways to get at a text font using the file locator,
> but then the encoding may be an issue. I don't know any simple way to get at
> the outline path of "\PyX" rather than "PyX".
> ---
> gallery/misc/INDEX     |    1 +
> gallery/misc/pyxpyx.py |   13 +++++++++++++
> 2 files changed, 14 insertions(+), 0 deletions(-)
> create mode 100644 gallery/misc/pyxpyx.py
> 
> diff --git a/gallery/misc/INDEX b/gallery/misc/INDEX
> index ae05119..e3f07ec 100644
> --- a/gallery/misc/INDEX
> +++ b/gallery/misc/INDEX
> @@ -1,4 +1,5 @@
> pattern
> +pyxpyx
> vector
> connect
> box
> diff --git a/gallery/misc/pyxpyx.py b/gallery/misc/pyxpyx.py
> new file mode 100644
> index 0000000..3641eb7
> --- /dev/null
> +++ b/gallery/misc/pyxpyx.py
> @@ -0,0 +1,13 @@
> +from pyx import *
> +from pyx.dvi.mapfile import MAPline
> +
> +f = MAPline('cmb10 CMB10 <cmb10.pfb').getfont()
> +
> +c = canvas.canvas()
> +tpath = f.text(0, 0, "PyX", 300).textpath().reversed()
> +t = r"\PyX is fun. "
> +n = int(tpath.arclen() / text.text(0, 0, t).width)
> +c.draw(tpath, [deco.curvedtext(t*n)])
> +
> +c.writeEPSfile("pyxpyx")
> +c.writePDFfile("pyxpyx")
> -- 
> 1.7.7.338.g0156b
> 
> 
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2d-oct
> _______________________________________________
> PyX-devel mailing list
> PyX...@li...
> https://lists.sourceforge.net/lists/listinfo/pyx-devel
-- 
by  _ _      _    Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim
   / \ \    / )   wo...@us..., http://www.wobsta.de/
  / _ \ \/\/ /    PyX - High quality PostScript and PDF figures
 (_/ \_)_/\_/     with Python & TeX: visit http://pyx.sourceforge.net/
 |