[OpenFontLibrary] Fwd: Using Pango for Batch Processing

Dave Crossland dave at lab6.com
Tue Feb 17 10:12:25 PST 2009


:)

---------- Forwarded message ----------
From: Wouter Bolsterlee <wbolster at gnome.org>
Date: 2009/2/17
Subject: Re: Using Pango for Batch Processing
To: gtk-i18n-list at gnome.org


2009-02-17 klockan 18:23 skrev Joshua Harvey:
> I'm interested in using Pango to set type in OpenType fonts to be saved as
> PNG images. I've done some googling and I can't find any examples on how
> to use the library or pango-view to do this without GTK. The idea is to
> use either pango-view or the Pango Ruby wrapper to convert text into PNGs
> on the fly from a linux server that's not running gtk, for use as titles
> in web pages.
> I've got pango-view installed, but when I run it I get:
> % pango-view -q --text "hi there" -o hi.png

Hello Joshua,

I wrote something exactly for this a while back, but never got around to
publish it. I just uploaded it to Launchpad for you:

 https://code.launchpad.net/~uws/+junk/render-text-to-image

There's a README file telling you how to use it. Basically it's just his:

 $ render-text-to-image \
   --font='Georgia' \
   --size=48 \
   --text-color='#eee' \
   --background-color='#000' \
   --text='Hello, world!' \
   --output=hello.png

It also supports transparency, margins, and some simple markup.

Good luck, and let me know if you have any comments!

   — Wouter
-------------- next part --------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: This message was signed/encrypted using GnuPG.

iEYEARECAAYFAkma+RwACgkQP7QTTiUKY+vXdgCeLbdDoO2tPcyd1flpBop57Wsc
C20AniWgNc4Kkfgah3zyHKU9DrBch/QQ
=2z9n
-----END PGP SIGNATURE-----


More information about the OpenFontLibrary mailing list