RE: pango_layout_set_alignment not working for printing



> -----Original Message-----
> From: Me
> Sent: Sunday, March 29, 2009 9:52 AM
> 
> Hi,
> 
> So, to try to print some text centered I added a call to
> pango_layout_set_alignment(layout, PANGO_ALIGN_CENTER) on the
> PangoLayout
> right after setting the text and attributes in it, and that did nothing
> -
> the text still prints left-aligned.
> 
> I also tried pango_layout_set_justify which also did nothing, and to
> make
> sure the layout was wide enough, added this which also made no
> difference:
>         gdouble pageWidth = gtk_print_context_get_width(context);
>         pango_layout_set_width(layout, pageWidth * PANGO_SCALE);
> 
> Anyone got any ideas what I might be missing?

I just tried calling pango_layout_set_tabs on the PangoLayout of the print
context and that works fine. So why should tabs work but alignment and
justify not?

Ian





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