How to figure out position of ellipse in ellipsized text?
- From: Stefan Landvogt <stefan landvogt gmail com>
- To: gtk-i18n-list gnome org
- Subject: How to figure out position of ellipse in ellipsized text?
- Date: Mon, 13 Jul 2009 15:38:55 +0200
Let's assume, that the PangoLayout is ellipsised at the end with
PANGO_ELLIPSIZE_END.
Now the text ist too long and pango_layout_is_ellipsized
(m_PangoLayout) actually returns true.
How do I figure out, where the actual ellipse is located, and where my
text in that line ends?
When I iterate through the lines of text and look at a line with
PangoLayoutLine *pangoLayoutLine = pango_layout_get_line_readonly(
m_PangoLayout, line );
and then retrieve
pangoLayoutLine->start and pangoLayoutLine->length,
then I get a longer text, then actually displayed.
The weird thing is: The graphems that are not displayed anymore have
the width of 2.255
Any hint on how to figure out, where the ellipse is actually located
is creatly appreciated!
Kind regards,
Stefan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]