Pango layout wrap problem
- From: johnny kao <kaojohnny gmail com>
- To: gtk-i18n-list gnome org
- Subject: Pango layout wrap problem
- Date: Fri, 29 Oct 2010 20:35:06 +0800
Hi all,
Recently I am writing a little layout engine for a project, but I encounter a problem about Pango's wrap behavior.
I found Pango will wrap the string such as:
pango_layout_set_text (layout, "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++", -1);
pango_layout_set_width (layout, 240 * PANGO_SCALE);
pango_layout_set_wrap (layout, PANGO_WRAP_WORD);
but it will not wrap the string such as:
pango_layout_set_text (layout, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", -1);
pango_layout_set_width (layout, 240 * PANGO_SCALE);
pango_layout_set_wrap (layout, PANGO_WRAP_WORD);
I expect both of them not wrapped. Do I miss any setting to the layout?
I know if I don't call pango_layout_set_width(...) the layout will not be wrapped, but I do need Pango help me wrap a real sentence.
I am a very newbie for pango, any advice is very welcome.
Thanks,
Johnny
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]