pango -- prevent line break?
- From: Allin Cottrell <cottrell wfu edu>
- To: gtk-app-devel-list gnome org
- Subject: pango -- prevent line break?
- Date: Wed, 19 Oct 2011 16:28:04 -0400 (EDT)
I have some text I'm displaying via pango and while in general
I want to allow automatic line breaks, I want to prevent line
breaks from occurring in certain contexts.
Specifically, what I'm trying to avoid is the breaking of
option-flag strings such as "--quiet" in online documentation
(with "--" appearing on one line and "quiet" on the next).
I've tried creating a GtkTextTag like this:
tag = gtk_text_tag_new("optflag");
g_object_set(tag, "family", "monospace",
"wrap-mode", GTK_WRAP_NONE,
"wrap-mode-set", TRUE, NULL);
then adding it to the appropriate GtkTextTagTable, and using
gtk_text_buffer_insert_with_tags_by_name to wrap the option
strings. But, alas, it doesn't help: the monospace font is
applied OK, but I still get line breaks after "--".
Any suggestions would be appreciated.
--
Allin Cottrell
Department of Economics
Wake Forest University, NC
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]