Re: failing to get PangoContext
- From: Lars Clausen <lrclause cs uiuc edu>
- To: Tony Graham <Tony Graham Sun COM>
- Cc: gtk-i18n-list gnome org
- Subject: Re: failing to get PangoContext
- Date: Tue, 21 Oct 2003 14:28:57 -0500
On 20 Oct 2003, Tony Graham wrote:
> Daniel Glassey <danglassey ntlworld com> wrote at Sat, 18 Oct 2003
> 21:45:32 +0100:
>> Hi,
>> When I try and run a pretty minimal program below which just opens up a
>> display and tries to get a PangoContext from it it fails with the error
>> below.
>>
>> Am I missing something obvious?
>
> Yes. Well, something simple but not necessarily obvious until you've
> stumbled as you have.
>
> Add:
>
> g_type_init();
>
> before you do anything with GObject or any library that uses
> GObjects. In your case, add it before you call any Pango functions.
>
> As the g_type_init() documentation says, "Prior to any use of the type
> system, g_type_init() has to be called to initialize the type system
> and assorted other code portions (such as the various fundamental type
> implementations or the signal system)."
So this is all you need to do to use Pango? In Dia, we've been wanting to
have the possibility of an X-less conversion option, but I was unsure how
to use Pango without calling gtk_init first. Excellent?
-Lars
--
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| HÃ¥rdgrim of Numenor
"I do not agree with a word that you say, but I |----------------------------
will defend to the death your right to say it." | Where are we going, and
--Evelyn Beatrice Hall paraphrasing Voltaire | what's with the handbasket?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]