Re: pango_layout_iter_get_char_extents()
- From: Havoc Pennington <hp redhat com>
- To: Sven Neumann <sven gimp org>
- Cc: Owen Taylor <otaylor redhat com>, gtk-devel-list gnome org
- Subject: Re: pango_layout_iter_get_char_extents()
- Date: 20 Jul 2001 12:47:38 -0400
Sven Neumann <sven gimp org> writes:
> The fact that empty clusters are added at the end of the line is
> documented and did not surprise me, but clusters are definitely
> not handled as described in your first reply (you said they'd be
> equivalent to a font glyph). The iterator and get_extents function
> behave as if clusters were lines (at least for the case of simple
> layouts without attribute changes).
Clusters are equivalent to a font glyph, but perhaps abused a bit in
the iterator API.
> > IIRC cluster-splitting cases may happen from time to time, if
> > graphemes and clusters are not identical for some reason.
> >
> > That is, some languages may allow you to do the equivalent of
> > selecting the accent but not the letter the accent is over the top of.
>
> yes probably, but the extents returned from
> pango_layout_iter_get_char_extents won't help you to visually select
> (highlight or whatever) the accent since they are simply bogus values
> if calculated by cluster_width / char_count. They do not even give you
> to the correct extents of simple, uncombined glyphs. Better gid rid of
> this unused and unusable API functions before more people get confused.
>
Owen's example of the fi ligature is a better explanation of why this
is needed. You want to draw the selection midway through the fi glyph.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]