Interaction of Pango Wrapping and Alignment

View: New views
3 Messages — Rating Filter:   Alert me  

Interaction of Pango Wrapping and Alignment

by John Boncek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

pango_layout_set_alignment with either PANGO_ALIGN_CENTER or PANGO_ALIGN_RIGHT apparently has no effect when wrapping is turned off.  I have been unable to find any statement in the documentation or mailing list about this, or with extensive use of Google.  Perhaps this was a design choice reflected in the use of pango_layout_set_width to -1 as the way to turn off wrapping?

Re: Interaction of Pango Wrapping and Alignment

by Behdad Esfahbod-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 2008-06-24 at 09:43 -0700, John Boncek wrote:
> pango_layout_set_alignment with either PANGO_ALIGN_CENTER or
> PANGO_ALIGN_RIGHT apparently has no effect when wrapping is turned off.

Works here:

$ pango-view --align center --text $'testttt\ning'

Gives me something that looks like this:

+-------+
|testttt|
|  ing  |
+-------+


behdad


>   I
> have been unable to find any statement in the documentation or mailing list
> about this, or with extensive use of Google.  Perhaps this was a design
> choice reflected in the use of pango_layout_set_width to -1 as the way to
> turn off wrapping?
--
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

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@...
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Interaction of Pango Wrapping and Alignment

by John Boncek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just showed that it works in a small test program (and should have done that before posting, sorry), so there must be something else going wrong in the application.  We've knocked our heads on this one for a long time.  Thanks.

John

Behdad Esfahbod-3 wrote:
Works here:

$ pango-view --align center --text $'testttt\ning'

Gives me something that looks like this:

+-------+
|testttt|
|  ing  |
+-------+
LightInTheBox - Buy quality products at wholesale price