Re: glyph item split

2011-05-27 Thread Behdad Esfahbod
On 05/27/11 12:55, august wrote:
   The split_index is said to be: byte index of position to split item,
   relative to the start of the item
 
   Can you explain what this means in more detail?   What is the start
   of the item?  How do I get that?

The item corresponds to a chunk of the text, say, from start to end.  start is
what you want.  It's recorded in item-offset actually.

So this should work, if everything else is correct:

  Pango.GlyphItem vorn =  glyphitem.split ( text,
glyphitem.glyphs.log_clusters[gi.end_index] - glyphitem.item.offset)


You may want to check the source code in situations like this.

behdad
___
gtk-i18n-list mailing list
gtk-i18n-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-i18n-list


Re: glyph item split

2011-05-27 Thread august
 On 05/27/11 12:55, august wrote:
  The split_index is said to be: byte index of position to split item,
  relative to the start of the item
  
  Can you explain what this means in more detail?   What is the start
  of the item?  How do I get that?
 
 The item corresponds to a chunk of the text, say, from start to end.  start is
 what you want.  It's recorded in item-offset actually.
 
 So this should work, if everything else is correct:
 
   Pango.GlyphItem vorn =  glyphitem.split ( text,
 glyphitem.glyphs.log_clusters[gi.end_index] - glyphitem.item.offset)
 

thanks for the reply.  Can you tell me what happens to the glyphitem and
the gi when I make that split?

The following code goes through a text line by line, run by run, and
glyphitem by glyphitem.  It then tries to split off the first cluster
and continue in the loop.   

http://pastebin.com/Ewi3c1UD

Line 79 is where the split happens.   I'm sure this changes the
glyphitemiter somehow, but don't know how to do it so that I can
continue inside that loop.   Any suggestions?


 You may want to check the source code in situations like this.

I couldn't find anything that is doing something similar to what I want.

any help would be appreciated.

many thanks -august.
___
gtk-i18n-list mailing list
gtk-i18n-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-i18n-list