Re: Using Pango for Batch Processing
- From: Behdad Esfahbod <behdad behdad org>
- To: Wouter Bolsterlee <wbolster gnome org>, gtk-i18n-list gnome org, Joshua Harvey <joshmh gmail com>
- Subject: Re: Using Pango for Batch Processing
- Date: Mon, 16 Mar 2009 23:52:00 -0400
On 02/17/2009 12:51 PM, Wouter Bolsterlee wrote:
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
I wrote something exactly for this a while back, but never got around to
publish it. I just uploaded it to Launchpad for you:
Dude, just hack pango-view to do what you want.
There's a README file telling you how to use it. Basically it's just his:
$ render-text-to-image \
--text='Hello, world!' \
It also supports transparency, margins, and some simple markup.
pango-view from the just-released pango 1.24.0 does all that:
$ pango-view \
--font 'Georgia 48px' \
--foreground '#eee' \
--background transparent \
--text 'Hello, world!' \
--output hello.png \
Good luck, and let me know if you have any comments!
] [Thread Prev