Re: Text stuffing with Cairo/pycairo?

Behdad Esfahbod <[email protected]> Wed, 24 Apr 2019 10:45:39 -0700
Newsgroups gmane.comp.lib.cairo
Message-ID <CAF63+7XMMNB+GaBsbOpNezGG9SknY6Y6phukBCrvK7iNQnoiAQ@mail.gmail.com>
--===============1335608993==
Content-Type: multipart/alternative; boundary="000000000000d3950605874a45b8"

--000000000000d3950605874a45b8
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Cairo can definitely do that. But it's you're on Mac, definitely look into
DrawBot.

On Wed, Apr 24, 2019, 7:28 AM Warren Vick <[email protected]> wrote:

> Hello,
>
>
>
> New to the list and wondering if Cairo might be the right library to help
> me create some vector-based typographic art.
>
>
>
> I=E2=80=99d like to create a piece that only use text at various font fac=
es,
> sizes, style, colours, etc. It would largely be machine generated so I=E2=
=80=99d
> like to find a software library that will help me place vector text on a
> canvas and finally save as a large PDF. From a Python script, I=E2=80=99d=
 like to
> be able to specify a bounding box on the page, the text string, text
> attributes and get the library to fill (by sizing and stretching) the tex=
t
> to fill the box. I=E2=80=99ll repeat this process several thousand times =
and when
> I=E2=80=99m done, simply save the PDF. I=E2=80=99d love to avoid messing =
around with font
> metrics if I can and get the library to do the =E2=80=9Ctext stuffing=E2=
=80=9D for me.
>
>
>
> Is Cairo and the pycairo bindings the right library for me? Any simple
> example out there that might help? Many thanks.
>
>
>
> Regards,
>
> Warren
>
>
> --
> cairo mailing list
> [email protected]
> https://lists.cairographics.org/mailman/listinfo/cairo

--000000000000d3950605874a45b8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">Cairo can definitely do that. But it&#39;s you&#39;re on =
Mac, definitely look into DrawBot.</div><br><div class=3D"gmail_quote"><div=
 dir=3D"ltr" class=3D"gmail_attr">On Wed, Apr 24, 2019, 7:28 AM Warren Vick=
 &lt;<a href=3D"mailto:[email protected]">[email protected]</a>&gt; wro=
te:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b=
order-left:1px #ccc solid;padding-left:1ex">





<div lang=3D"EN-GB" link=3D"#0563C1" vlink=3D"#954F72">
<div class=3D"m_4217989150916204784WordSection1">
<p class=3D"MsoNormal">Hello,<u></u><u></u></p>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<p class=3D"MsoNormal">New to the list and wondering if Cairo might be the =
right library to help me create some vector-based typographic art.<u></u><u=
></u></p>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<p class=3D"MsoNormal">I=E2=80=99d like to create a piece that only use tex=
t at various font faces, sizes, style, colours, etc. It would largely be ma=
chine generated so I=E2=80=99d like to find a software library that will he=
lp me place vector text on a canvas and finally save
 as a large PDF. From a Python script, I=E2=80=99d like to be able to speci=
fy a bounding box on the page, the text string, text attributes and get the=
 library to fill (by sizing and stretching) the text to fill the box. I=E2=
=80=99ll repeat this process several thousand times
 and when I=E2=80=99m done, simply save the PDF. I=E2=80=99d love to avoid =
messing around with font metrics if I can and get the library to do the =E2=
=80=9Ctext stuffing=E2=80=9D for me.<u></u><u></u></p>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<p class=3D"MsoNormal">Is Cairo and the pycairo bindings the right library =
for me? Any simple example out there that might help? Many thanks.<u></u><u=
></u></p>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<p class=3D"MsoNormal"><span>Regards,<u></u><u></u></span></p>
<p class=3D"MsoNormal"><span>Warren<u></u><u></u></span></p>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
</div>

-- <br>
cairo mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank" rel=3D"norefer=
rer">[email protected]</a><br>
<a href=3D"https://lists.cairographics.org/mailman/listinfo/cairo" rel=3D"n=
oreferrer noreferrer" target=3D"_blank">https://lists.cairographics.org/mai=
lman/listinfo/cairo</a></blockquote></div>

--000000000000d3950605874a45b8--

--===============1335608993==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

LS0gCmNhaXJvIG1haWxpbmcgbGlzdApjYWlyb0BjYWlyb2dyYXBoaWNzLm9yZwpodHRwczovL2xp
c3RzLmNhaXJvZ3JhcGhpY3Mub3JnL21haWxtYW4vbGlzdGluZm8vY2Fpcm8=

--===============1335608993==--