Re: failing to get PangoContext



> > 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?
>
> See, for example, pangoft2topgm.c in the examples directory of recent
> Pango releases.
>
> Now I'm confused.  What is an "X-less conversion option"?

I wanted to set the context without needing to have x windows running and I
used the method as per example pangoft2topgm.c which was suggested to me by
Noah (thanks).  Basically using fontmaps:

  fontmap = pango_ft2_font_map_new ();
  pango_ft2_font_map_set_resolution (PANGO_FT2_FONT_MAP (fontmap), 96, 96);
  context = pango_ft2_font_map_create_context (PANGO_FT2_FONT_MAP
(fontmap));

Worked sweet for me and no need for gtk_init or X :-)

Z.






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]