Re: Rendering "in memory" using pango
- From: Behdad Esfahbod <behdad behdad org>
- To: Matthew Willis <matthew willis mac com>
- Cc: gtk-i18n-list gnome org
- Subject: Re: Rendering "in memory" using pango
- Date: Thu, 05 Jun 2008 11:05:13 -0400
On Thu, 2008-06-05 at 00:55 -0700, Matthew Willis wrote:
> I'm using pango to render text that eventually ends up in an opengl
> texture. I just need to supply opengl with a byte-array, and I have
> been using the cairo backend to render to an image surface in order to
> get the bytes.
>
> Is there a way I can cut cairo out of the picture and just get the bytes
> that correspond to a pango layout from pango directly? Pango's front
> page mentions this capability, but I have scoured the documentation
> without finding it. What does the front page mean by:
>
> "Rendering can be with with Cairo or Xft libraries, or *directly to an
> in-memory buffer with no additional libraries*." (emphasis mine)
That's what the pangoft2 backend does. Check the pango_ft2_* functions.
However, I don't recommend using that backend anymore. The only
*supported* backend at this time is pangocairo, and the only one seeing
future development.
> Thank you for your help,
> Matthew Willis
--
behdad
http://behdad.org/
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]