[pygtk] Image Manipulation under pyGTK

Dieter Verfaillie dieterv at optionexplicit.be
Thu Apr 5 03:54:15 WST 2007


Hi,

sorry for the late reply, kinda lost track of this...

On Fri, 2007-03-30 at 21:08 +0900, Tim Flink wrote: 
> Thanks, that helps a lot. It doesn't look quite as nice under Win32 but 
> I think that this is about as good as I am going to get unless I find a 
> way to build cairo using freetype with antialiased text support under 
> windows.
> 
> Is there a way to set the text direction in Pango? I'm writing in 
> Japanese text and the default direction for Japanese is top to bottom, 
> right to left but I would like to use LTR instead. All I have been able 
> to find so far is using pango.Context.set_base_dir() but 
> pangocairo.CairoContext doesn't seem to have the same method.Is there 
> another way to set the base direction?

That would be normal as pango.Context and pangocairo.CairoContext are
different animals.

Now for the good news, from
http://developer.gnome.org/doc/API/2.0/pango/pango-Vertical-Text.html
  - Since 1.16, Pango is able to correctly lay vertical text out.
  - Note the Gravity stuff

Download
http://svn.gnome.org/viewcvs/pango/trunk/pango-view/test-mixed.txt?revision=2222
then run (with pango 1.16 or newer):
  - for vertical layout (see vertical.png for output):
     pango-view --gravity=east ./Desktop/test-mixed.txt --rotate -90 --margin 60 --markup

  - for horizontal layout (see horizontal.png for output):
     pango-view --gravity=south ./Desktop/test-mixed.txt --margin 60 --markup

Looks good, huh :)

Except, for the bad news: I'm not sure pygtk wraps that part of the
pango api yet (the gravity stuff). At least, I didn't find them in the
.defs/.override files in trunk svn. Anyone have a clue about this?

mvg,
Dieter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20070404/22fcf2b5/attachment.pgp


More information about the pygtk mailing list