Re: Where to get 'PangoContext*' from?
- From: Behdad Esfahbod <behdad behdad org>
- To: Petr Tomasek <tomasek etf cuni cz>
- Cc: gtk-i18n-list gnome org
- Subject: Re: Where to get 'PangoContext*' from?
- Date: Wed, 20 Jan 2010 14:28:14 -0500
On 01/20/2010 04:29 AM, Petr Tomasek wrote:
>
> Hello!
>
> I'd like to use pango_itemize in a command-line utility to split an
> unicode string into parts of same script. I don't need any other pango
> functionality (in this utility, of course ;-).
Use PangoScriptIter then. Itemization does a lot more than what you need.
> Now, pango_itemize() wants PangoContext* as it's first parameter,
> but if I create it using pango_context_new() it complains:
Did you read the docs for pango_context_new()? That points you to
pango_font_map_create_context().
behdad
> ------------------------------------------------------------------------
> (process:14724): GLib-GObject-CRITICAL **: gtype.c:2458: initialization assertion failed, use IA__g_type_init() prior to this function
>
> (process:14724): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
>
> (process:14724): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed
>
> (process:14724): Pango-CRITICAL **: pango_itemize: assertion `context != NULL' failed
> ------------------------------------------------------------------------
>
> If I would use pango_font_map_create_context() as suggested in the doc's
> where do I get PangoFontMap* from?
> (And I don't undestand anyway, frankly, why would one need
> PangoFontMap just for itemizing a string?)
>
> Thank You!
> Petr
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]