Re: go from PangoGlyphItemIter to an index into a PangoLogAttr ?
- From: august <august alien mur at>
- To: Behdad Esfahbod <behdad behdad org>
- Cc: gtk-i18n-list gnome org
- Subject: Re: go from PangoGlyphItemIter to an index into a PangoLogAttr ?
- Date: Tue, 26 Oct 2010 06:31:38 +0200
> > The pango docs say that the get_log_attrs function "Retrieves an
> > array of logical attributes for each character in the layout. "
> > What does character mean in that sentence?
>
> Character means Unicode characters, ie. g_utf8_get_char().
Thanks. The wording in the docs is less than clear.
And, because there are such things as glyphitemiter.glyph_item.glyphs.glyphs
where there first "glyphs" refers to a glyphstring and the second to a
glyphinfo, it makes me unsure of whether or not wording is used
consistently throughout. (I'm pretty sure however that a character is
not a movie character :)
My main problem, which I have partially solved, is how to iterate
through a layout (line by line, run by run, and then glyphitem by gitem)
and keep the log_attributes I get from the layout in sync with my
iteration.
I noticed that when I change the set_width() of my layout, the number of
characters in the layout/log_attr array changes. Why is that?
I was surprised when I found this out...but still don't know how it
changes the character count. Is there now an extra char in my log_attr
for every line or run or some mixture? I ran some tests where I
increment my index into the log_attr array for each line or run, but did
not see any regularity. My solution for now is to not set_width on the
layout.
I've also tried to get an index into the log_attr array using
log_attr[glyphitemiter.glyph_item.glyphs.log_clusters[i]]
where "i" is incremented for every call to next_cluster()
however, this does not work ( at least not when you set_width on the
layout).
Am I seeing this as being more complicated than what it is?
thanks -august.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]